Subject RE: [IBO] Trouble in catching Post error
Author Riho-Rene Ellermaa
They were not called (I had breakpoint in the first line of OnPostError eventhandler). I haven't done anything fancy - just created query and added OnPostError event to it.
Maybe "missing necessary fields" doesn't qualify as Post error?


Riho-Rene Ellermaa
senior programmer
Hansabank


Were they "not called" or were they handled elsewhere because your code didn't catch the exact exception that occurred? What does your handler do with the EIB_Error that is passed to the event? Did you declare your own EIB_Error classes to handle the specific exceptions that might have occurred?

btw, you don't need those specific On..Error handlers - they are there for VCL compatibility - you can do much more centralised error handling at the connection level in IBO. There's good argument for not dispersing error handlers all over the place. They are more easily maintained and, if you organise them neatly, you can make it easy for yourself and your peer reviewers to test your error-handling "stack" (what happens next, if an exception is passed up to the next level in the exception hierarchy?) It makes the opportunities to make generic handlers much more obvious, too...




[Non-text portions of this message have been removed]