Subject Re: [IBO] Catching errors
Author Helen Borrie (TeamIBO)
At 09:21 AM 14-05-02 +0300, Riho-Rene Ellermaa wrote:
>Using IBO4.2
>
>How can I catch errors like "Required field missing"? I would like to show
>user my own message.
>I tried to use various OnError events of TIB_Query - OnError,
>OnEditError,OnPostError,... - but I got always the system error (in
>english) and my events were not reached at all.
>
>Any hints welcome

All of the errors that IBO raises in the components are typed exceptions,
of type EIB_Error (+ descendants). The example you gave is an EIB_Error of
subclass EIB_DatasetError. The error texts are all defined in
ib_constants.pas. There are a lot of translations of ib_constants - browse
through the selection in your IBO root directory and see whether there is
already one for your language.

You can subclass any of these error types, as well - perhaps setting up
your own application-specific error unit where you define your error texts
with finer grain; and even using it as a central unit where all parts of
your application can go for error handling.

There's a TI sheet on this topic, on the TechInfo page...

regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com