GetTransactionName Function

Action

Returns the name of the currently executing transaction. If it is called within an error handler, it will return the name of the transaction where the error was raised.

Include file

Kernel.bdh

Syntax

GetTransactionName(  ): string;

Return value

The name of the transaction.

Example

dclevent
  handler ErrorHandler <EVENT_RAISE_ERROR>
  var
    sBuf : string;
  begin
    sBuf := GetTransactionName();
    write("error raised in transaction " + sBuf);
    throw;
  end ErrorHandler; 

dcltrans
  transaction TRaiseError
  begin
    // WebPageUrl will raise an error
    WebPageUrl("http://Does.not.exist");
  end TRaiseError;

Output

Error raised in transaction TRaiseError.