Uniscript error handler

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
simbahmerapi
Posts: 2
Joined: Mon 26 Oct 2009 16:16

Uniscript error handler

Post by simbahmerapi » Mon 26 Oct 2009 16:29

How to handle error in uniscript ?? I want to if a statement is resulting error, then all statement aborted and transaction is rollback with my own message.
I use event OnError of Uniscript like this :
Begin
Action := eaAbort;
abort;
End;

this is for aborting execution and prevent from default message of error handler show.

Is this correct?? or there is better way to do??
Thanks... Sorry for my bad english

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 27 Oct 2009 09:11

You should set Action to eaAbort in the OnError event.

You don't need to call the Abort procedure.

You can rollback transaction and show your error message from the OnError event handler.

Post Reply