views:

57

answers:

1

Hi, I have the problem to catch an EInOutError exception in CBuilder 2007 that is thrown inside an AsyncPro component. I have put a "try" statement around the Application->CreateForm() calls, but this covers only up to the constructor of the classes. From there the Forms run in their own thread and exceptions are not catched.

Does anybody know how to catch exceptions thrown by components on a form in CB2007?

A: 

Wrap any component operations you perform in your code with their own try/catch blocks. If the component is asynchronous and the exceptions are occuring inside the component in its own timers/threads/whatever, then try using the TApplication::OnException event instead.

Remy Lebeau - TeamB