Returns the name of the currently executing BDL function. If it is called within an error handler, it will return the name of the function where the error was raised.
Kernel.bdh
GetFunctionName( ) : string;
The name of the function.
dclevent handler ErrorHandler <EVENT_RAISE_ERROR> var sTrac : string; sFunc : string; begin sTrac := GetTransactionName(); sFunc := GetFunctionName(); write("error raised in transaction " + sTrac + " in function " + sFunc); throw; end ErrorHandler; dclfunc function f1 begin // WebPageUrl will raise an error WebPageUrl("http://Does.not.exist"); end f1; dcltrans transaction TRaiseError var sBuf : string; begin f1(); end TRaiseError;
Error raised in transaction TRAISEERROR in function F1.