I like to have a more detailed trigger system that allows me to choose a trigger that fires before or after the trigger event.
For example:
- BeforeObjectEnter
- AfterObjectEnter – This is the current trigger OnObjectEnter
- BeforeLayoutExit – This is the current trigger OnLayoutExit
- AfterLayoutExit
- …
A new trigger AfterScriptError – preferable also in a Before version, but I guess FileMaker cannot predict when an error will occur ;-)
This trigger will fire when an error occurs during a script, allowing to log the error and do other proper actions.
Of course the developer could add after each script step a sequence like If[ Get( LastError ) ≠ 0]; Perform Script "XYZ"; End If, but FIleMaker already triggers script errors, wen you select the option "Pause on error" in the script debugger. Why not giving us the option to trigger a script instead of opening the script debugger?
BeforeObjectEnter is mysterious. Time is linear. And the distinction between OnLayoutExit vs. AfterLayoutExit eludes me. And we already have a mechanism to deal with errors in scripts, as you noted, so I don't really see what the added value is of AfterScriptError. However, I'm interested in errors that trigger outside of scripts, which is why I suggested Security triggers .