Database Reference
In-Depth Information
Errors 1200-1225 . Calculation-related errors (you see these errors in conjunction with
the EvaluationError0 and Evaluate0 functions).
Errors 1400-1414 . Assorted ODBC or SQL errors (see Chapter 21 ) .
See Appendix D for a complete list of FileMaker error codes.
TIP
To capture an error by number, try this: Turn on error capture before the step that's producing the er-
ror and then add a Show Custom Dialog step right after the offending step. Set the dialog box to
show Get(LastError) . When you run the script, instead of the error message you've been seeing,
you'll see a custom dialog box with the real error number. You can then modify the script to handle
this particular number.
But it's much easier to use the Script Debugger ( Script Debugger ) in FileMaker Pro Advanced. The
debugger automatically shows error numbers as they happen—no need to write junk steps into your
scripts that you just have to strip out again. There's even an option to set your scripts to pause when
an error ( Examining Errors ) occurs so you can analyze the situation and fix the problem.
The Allow User Abort Script Step
One more script step has ramifications when dealing with errors: Allow User Abort . This
step lets you turn off a user's ability to cancel the script. Allow User Abort has only two
options: on and off. Its normal state is to be turned on, unless you specifically turn it off with
the script step. Like Set Error Capture , when you turn user abort off or back on within a
script, the setting carries through any subscripts called by the main script. Allow User
Abort always turns back on again when the script finishes running.
If you turn user abort off, but leave error capture on, the Cancel button in error messages is
removed, so the person is forced to continue the script. Turning off user abort also prevents
the user from pressing Esc (Windows) or -period (Mac) to cancel a running script. Finally,
if the script pauses, he doesn't get a Cancel button in the status area. Instead, the only choice
is to continue.
NOTE
When a script turns off user abort and pauses, the database user also can't switch to a different win-
dow, close the window, or quit FileMaker.
Search WWH ::




Custom Search