Page 1 of 1

Uniscript error handler

Posted: Mon 26 Oct 2009 16:29
by simbahmerapi
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

Posted: Tue 27 Oct 2009 09:11
by Plash
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.