GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Six — File Functions (continued)
Overview
The ReportFileError function presents file access errors in a user-friendly manner.
Syntax/Parameters
Syntax
int = ReportFileError ( string name, int code );
Parameters
name
A string containing the filename and path. This parameter supports UTF encoding for filenames with Unicode characters.
code
An int containing a return code. The code can contain application information, which is stripped off (for example, 0x80000002 is the same as 2).
Return Value
Returns an int as ERROR_NONE.
Remarks
The ReportFileError function creates a friendly box to display file access errors. It is a tool to quickly and easily display errors to the user without having to translate the error code and call a message box function, such as the MessageBox or OkCancelBox functions. The message box will contain information concerning the file that the script attempted to access (as supplied by the name parameter) and information about the error code, if available. Certain common errors appear as follows:
File Not Found (2):
Path Not Found (3):
File Sharing Error (32):
Network Error (64):
Syntax error in path (123):
Other common Windows error codes (for a list, see the Appendix or MSDN) may be translated and displayed. Note that the ReportFileError function does not attempt to open the file. It is the programmer’s responsibility to ensure that the dialog refers to the correct filename and path.
If the error code is ERROR_NONE (0) or Windows SDK ERROR_SUCCESS (0), the function does not display a message box.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are 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 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.