On Fri, 3 Mar 2006, Bogus?aw Brandys wrote:
Hello,
Please ask FPC developers if they could add ErrorNumber to EDatabaseError
exception to differentiate what was the cause of exception.It would be
helpful for sqldb package also.
This should for example evaluate to GDSCODE for Interbase/Firebird and is
more clever way to use in case...end inside "on exception handler"
Besides for example Firebird frequently return (string) error message which
is concatenation of several errors (cascade error reporting) - not good to
compare.
While I understand why you want this:
The disadvantage of this is that you need to have a complete list of
error numbers and their meaning, and they should be the same accross
databases, which is not feasible.
The proper way of doing this is to create a descendent which contains the
error code.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives