Subject | exception class |
---|---|
Author | Jonathan M. Freedman |
Post date | 2003-08-31T19:06:57Z |
The OnError event for IB_Connection can prevent an exception from
being raised...how?...it can trap an exception (see example), but
does not prevent a vcl error window from being shown first, stemming
from IB_Session's HandleException. Also, in the help for OnError it
mentions creating a custom exception class...could u point me in the
direction of how to do so.
source code (this works)
void __fastcall TfdatmodCPM::conCPMError(TObject *Sender,
const int ERRCODE, TStringList *ErrorMessage,
TStringList *ErrorCodes, const int SQLCODE, TStringList
*SQLMessage,
TStringList *SQL, bool &RaiseException)
{
switch (ERRCODE)
case 335544472:
ShowMessage("You have entered the wrong username, password, or
role.") ;
RaiseException = 0 ;
}
i would like to prevent the error message generated by
HandleException and replace it with the above.
jf
being raised...how?...it can trap an exception (see example), but
does not prevent a vcl error window from being shown first, stemming
from IB_Session's HandleException. Also, in the help for OnError it
mentions creating a custom exception class...could u point me in the
direction of how to do so.
source code (this works)
void __fastcall TfdatmodCPM::conCPMError(TObject *Sender,
const int ERRCODE, TStringList *ErrorMessage,
TStringList *ErrorCodes, const int SQLCODE, TStringList
*SQLMessage,
TStringList *SQL, bool &RaiseException)
{
switch (ERRCODE)
case 335544472:
ShowMessage("You have entered the wrong username, password, or
role.") ;
RaiseException = 0 ;
}
i would like to prevent the error message generated by
HandleException and replace it with the above.
jf