September 26, 201312 yr I doubt many people care about this, but I'm annoyed that my Server Script is throwing errors in the server Log Viewer (under the Server Events module). Specifically, error 401 (No records match the request) and 101 (Record is missing). Even if I have Set Error Capture [On] in there and capture the error code using Get(LastError), FileMaker Server still throws an accusing finger at me and says "scripting error"! It'd be nice to eliminate error warnings like this so I can focus on real errors that I care about. I'm running FileMaker Server 12 Advanced (12.0.4.405).
September 26, 201312 yr Do an ExecuteSQL to do a quick select, if that comes up empty you can skip the real FM find. It's important to understand though that "Set Error Capture On" does not prevent the error from *happening*. The only thing it does is hide the error from the user so that you can handle it silently. If you run the same script in your debugger you will see that FM also reports the error.
September 27, 201312 yr Author Ahh, but that would require me to learn the Execute SQL script step! Interesting tip; I may try that out. As for capturing errors, I knew that errors were still reported, but I wasn't sure if it was germane to the issue at hand.
Create an account or sign in to comment