In order to learn how to intercept exception on IBCTransaction, I prepare a code like this
Code: Select all
try
IF NOT TransactionFB.Active THEN
TransactionFB.StartTransaction;
TransactionFB.StartTransaction; // just to create an exception
except
on E: Exception do
begin
if E is EDatabaseError then
Begin
IF Log THEN
ShowMessage( E.Message);
End else begin
IF Log THEN
ShowMessage(E.ClassName + ' with message:' + E.Message);
end;
end;
end;
Anyway, according to your guide, this kind of error should be generate an EDatabaseError exception ("If TDATransaction.Active is True, indicating that a transaction is already in progress, a subsequent call to StartTransaction will raise EDatabaseError.").
However It is not the case with my exemple : the ClasseName is "Exception"
is it normal ?