Throw Statement

Terminates the execution of an event handler function by passing execution control to the runtime system. The runtime system continues with the default procedure for the event.

The throw keyword is only allowed in event handler functions. If the throw semantics is not applicable in a handler when called as a function, it finishes handler code execution.

Syntax

Stat = "throw".

Example

dclevent
  handler Handler1 <EVENT_RAISE_ERROR>
  begin
    if GetLastError() = 317 then
      writeln("Error 317 caught");
    else
      throw;
    end;
  end Handler1;

dcltrans
  transaction TestTrans
  begin
    ...
  end TestTrans;