Subject Re: [IBO] exception class
Author Paul Vinkenoog
Hello Jonathan,

> The OnError event for IB_Connection can prevent an exception from
> being raised...how?...it can trap an exception (see example), but
> does not prevent a vcl error window from being shown first, stemming
> from IB_Session's HandleException.

This is just to inform you, the programmer. If you set RaiseException
to false in your handler, you won't get an additional error message
(and your users won't get any error message). If the VCL error window
irritates you, you can turn it off for certain classes of exceptions.
This is done in Tools -> Debugger Options -> Language Exceptions.

> Also, in the help for OnError it mentions creating a custom exception
> class...could u point me in the direction of how to do so.

You can do this if it's useful in your application, but you don't have
to. Creating a custom exception class is just like subclassing another
class in C++:

class EIB_MyError : public EIB_Error
{
// declarations...
};

If you do create a custom class, it's a good idea to use EIB_Error as
parent, not Exception.


Hope this helps,
Paul Vinkenoog