ErrorInfo.Collectible([Boolean]) Method

Version: Available or changed with runtime version 8.0.

Specifies if the error is collectible using ErrorBehavior.Collect.

Syntax

[Collectible := ]  ErrorInfo.Collectible([Collectible: Boolean])

Note

This method can be invoked using property access syntax.

Parameters

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

[Optional] Collectible
 Type: Boolean
The collectible of the ErrorInfo

Return Value

[Optional] Collectible
 Type: Boolean
The current collectible of the ErrorInfo.

Example (get the Collectible property)

procedure myErrorHandlerProc( MyErrorInfo: ErrorInfo )
var 
    IsErrorCollectible: Boolean;
begin
    IsErrorCollectible := MyErrorInfo.Collectible();

    // do something 
end

Example (set the Collectible property)

var 
    MyErrorInfo: ErrorInfo;
begin
    // setup the error info object: Define Message, DetailedMessage etc.

    // set MyErrorInfo to be collectible
    MyErrorInfo.Collectible(true);

    Error(MyErrorInfo);    
end

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