Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

SetLastError Function

Overview

The SetLastError function allows a function to set the global error code and message for the script.

Syntax/Parameters

Syntax

int = SetLastError ( int code, [string message], [parameters ... ] );

Parameters

code

An integer or dword value to which the last error will be set. Do not set a value grater than 0xFFFFFFFF or an overflow error will occur.

message

An optional string to which the associated extended text message will be set. This value cannot be more that 256 characters in size. If omitted, the text portion is set to an empty string. If additional parameters are present, message is considered a formatted string. See Section 5.2 String Functions for more information on formatted strings.

parameters

Zero or more parameters to be formatted and inserted into message. If no parameters are supplied, message is simply passed through to the result string.

Return Value

Returns an int as ERROR_NONE.

Remarks

The SetLastError function provides an easy way to pass additional error information back to a caller. The values are subject to be reset anytime an SDK function is called.

The last error code can also be access by other application functions such as menu and other hooks.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic