Subject Handling database errors/exceptions
Author mirco@intellitec.de
I know this has been asked before, but I didn't find any suitable
reply.

What I would like to do is to have a standard database error handler
that catches all the things that can go wrong during inserts,
updates, deletes, etc and displays a custom error message.

I tried to assign a method to OnError (either of the query or the
database) which seems the right place to me. I can check the type
of error, display a message and continue.

What doesn't work though is the 'continue' part. After displaying the
message, the user should be able to continue working normally. I
tried "raiseexception:=false", but found that if an insert statement
fails (e.g. key violation), IB still raises an error telling me that
the insert didn't take place. The same is true for an update and
delete.

Note, that I cannot use try&catch to catch the exception, as I don't
do the insert or update in code myself... IB does it, e.g. when I
edit a grid.

I would appreciate any help on this.

Mirco Stange