ErrorInfo.Callstack() Method

Version: Available or changed with runtime version 8.0.

Specifies a callstack where the ErrorInfo was collected.

Syntax

Callstack :=   ErrorInfo.Callstack()

Note

This method can be invoked using property access syntax.

Parameters

ErrorInfo
 Type: ErrorInfo
An instance of the ErrorInfo data type.

Return Value

Callstack
 Type: Text
The callstack where the ErrorInfo was collected.

Remarks

When using the collectable errors feature, you might need the ErrorInfo.Callstack method to get AL stack traces for all errors collected while processing the list of errors.

Example

procedure myErrorHandlerProc( MyErrorInfo: ErrorInfo )
var 
    stackTrace: Text[2048];
begin
    stackTrace := MyErrorInfo.Callstack();

    // do something 
end

For an elaborate example, see the ErrorMessageManagement codeunit in the system application.

See Also

ErrorInfo Data Type
Collecting Errors
AL error handling
Get Started with AL
Developing Extensions