Subject | Re: [IBO] Version 4.7.16 Error Message changes? |
---|---|
Author | Ramil |
Post date | 2007-09-28T12:08:36Z |
Hi Paul.
I use such code in my OnError handler:
//-------------------------------------------------
var
MyErrorMsg: String;
case ERRCODE of
...
isc_except: // 335544517 - User Exception
if IBC.Characteristics.dbServer_Major_Version>1 then
MyErrorMsg:=ErrorMessage[5] // FireBird 2 and higher
// exception name have added in the
// ErrorMessage at line 4
else
MyErrorMsg:=ErrorMessage[4];
...
...
RaiseException:=False;
raise Exception.Create(MyErrorMessage);
...
//-------------------------------------------------
It works fine!
Best regards,
Ramil
I use such code in my OnError handler:
//-------------------------------------------------
var
MyErrorMsg: String;
case ERRCODE of
...
isc_except: // 335544517 - User Exception
if IBC.Characteristics.dbServer_Major_Version>1 then
MyErrorMsg:=ErrorMessage[5] // FireBird 2 and higher
// exception name have added in the
// ErrorMessage at line 4
else
MyErrorMsg:=ErrorMessage[4];
...
...
RaiseException:=False;
raise Exception.Create(MyErrorMessage);
...
//-------------------------------------------------
It works fine!
Best regards,
Ramil
>
>
>
>
>
> Hi
>
> On storing a record Firebird generates an exception 'Cannot end-date
> a Principle dentist'. This used to be reported to the user like
> that ie 'Cannot end-date a Principle dentist' - now I get
> _______________________
> ISC ERROR CODE:335544517
>
> ISC ERROR MESSAGE:
> exception 2
> Cannot end-date a Principle dentist
>
> STATEMENT:
> TIB_Statement:
>
> "<TApplication>,HFMMain.fDenFind.DentistForm.iboqDen.IBOqriboqDen.<TIB
> _UpdateSQL>.<TIB_Statement>
>
> STATEMENT:
> TIBOInterna.
> _________________________
>
> The users will think the end of the world has come ;-)
>
> Is there an easy way of switching this behaviour off? I've tried
> using OnError to present my message and setting RaiseException to
> false but the message is then followed by a 'Record not located for
> update' error.
>
> If it isnt possible already I think it would be a great idea if a
> global option at connection or session level could be used such that
> only the error message is presented and not the code or anything else.
>
> Regards
> Paul
>
>
>
>
>
> __________ NOD32 2556 (20070928) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>