![]() ![]() |
GoFiler Legato Script Reference
Legato v 1.6k Application v 6.6a
|
| Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
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. 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 or as ERROR_OVERLOW if the resulting string is too large. This function does not set the last error as a result of a processing problem. The last error and message are what is specified in the parameters.
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.
For the message string, the formatted message cannot be more than 256 characters in size. If it is, the return value will contain an error code. It does not set that last error or message, since that will interrupt the setting of data. Any string over 256 characters will simply be truncated with the return code set to ERROR_OVERFLOW.
The last error code can also be access by other application functions such as menu and other hooks.
As mentioned above, each API call except for GetLastError, GetLastErrorMessage, IsError and IsNotError will reset the content of the last error buffer and code. Flow and language statements, such as return, if, while, etc. will not change the last error information. See Section 5.24 Last Error Functions at the start of this section for more information.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
| Table of Contents | < < Previous | Next >> |
© 2012-2026 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission is prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. Novaworks, GoFiler™ and Legato™ are registered trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are the property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.