GoDraw Error Handling


When GoDraw encounters a problem it can’t handle it throws an error dialog up. For example if you pass something other than an image to the “Create New Document From Image(  Image  )” script GoDraw will pop a dialog with “The image must be a PNG or JPEG”.  It will also give you back a description of what happened in the Script Result.  We call this Script Result an “Error” or “Error Result”. It is in the form of  a list.

The first value in the list is “ERROR” the second value will be a description of what happened.  See “Testing for Errors” below for tips on how to test the API results for Errors

Suppressing Error Dialogs

If you want to suppress the error dialogs and throw your own you can.  Just use FileMaker’s  “Set Error Capture (On|Off)” script step.  GoDraw’s API Respects that setting.

Testing for Errors

The Error Result that comes back from GoDraw’s API is List.  The first item of the list ( ie Line 1 ) will the word “ERROR”. This makes it really easy to test for.  You can use something like this:

Leftwords( Get(ScriptResult) ; 1 ) = "Error"


GetValue( Get(ScriptResult) ; 1 ) = "Error"

You can then handle the error however you wish.

Still need help? Contact Us Contact Us