Chapter 21. FileMaker Error Codes

FileMaker displays error dialogs during normal operation; for example, if you attempt to enter text into a date field, FileMaker displays a dialog telling you that the value must be a valid date. FileMaker also generates errors in the course of executing a script, and you need to understand how to detect and handle these errors.

It’s only during scripting, or during certain interactions with the Web Publishing Engine (WPE), that you are in a position to trap and examine the error codes FileMaker generates. To do so requires that Error Capture be set to On during the script and that the script developer use the Get(LastError) function to inspect any possible errors.

The FileMaker error results that occur during scripts are transient. You must check for an error immediately after a script step executes. If script step A produces an error, and a subsequent script step B executes with no error, the error from script step A will be “forgotten” after script step B executes. Hence, the name of the Get(LastError) function: It reports only the last error code, even if that error code is 0 (no error). (Note, though, that the error code from the last script step is retained even after the script has stopped executing, until it is replaced by another script. Further, the script steps Exit Script and Halt Script do not clear the previous error code.)

The Script Debugger provides another tool for determining whether any errors occurred during the execution of a script. As shown in Figure 21.1, the Script Debugger automatically tells you the error code generated by the last executed script step. The error code is a link that takes you to the help system where you can view the error description. Further, the option to Pause on Error enables you to quickly test a script for errors without stepping through it line by line.

Image

Figure 21.1. The Script Debugger in FileMaker Pro 12 Advanced shows the error code generated by each script step as it executes.

Table 21.1 lists the errors that can arise during normal operation of FileMaker or during ODBC access. The errors listed in Table 21.2 are those generated by the FileMaker Server command-line interface.

Table 21.1. FileMaker Error Codes

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image

Table 21.2. FileMaker Server Command-Line Error Messages

Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.34.85