February 1, 201015 yr Hi 360Works team! I tried the new plugin version, 3.301, on Mac and PC. When a script doesn't return anything or there is a process error, I get 2 windows explaining the error. Before the update, there was no window and the returned value was either null or "ERROR". If I set the SetErrorCapture flag, will I get rid of the error dialog? There is nothing in the documentation about that flag. How can I use it? With the FMPRO object? Thanks in advance Edited February 1, 201015 yr by Guest
February 1, 201015 yr We've added a new feature to our plugins in the most recent update, which presents you with a dialog box popup if there is an error with one of our functions. This is in addition to the function returning "ERROR." The new popup shows the same information as the SMLastError function. You can disable this popup by using the "Set Error Caputure: ON" script step. Edited February 1, 201015 yr by Guest
February 1, 201015 yr Author Ha voila! Set Error Capture script step within FM... Ok but then, How can I capture the error if the registered ScriptMaster function is evaluated in Auto Enter Calc of a certain field? Thanks a lot BTW, your plugin is incredible and open a whole new world of possibilities for every FM developper. Edited February 1, 201015 yr by Guest
February 1, 201015 yr You can use the SMLastError function to get the last error message you received from the scriptmaster plugin.
February 1, 201015 yr Author Sorry, that is not exactly what I was asking... My question was perhaps a little ambiguous. How can I get rid of the errors dialogs if the registered SM function is evaluated in Auto Enter Calc of a field?
February 2, 201015 yr Hello patate - that is a good question. Since you cannot set error capture on/off for a field, there is not a way of configuring that right now. I will check into whether it is possible for the plugin to detect whether it is running in a script vs. a field, and only show the error message if it is in a script. In the meantime, you're probably best off just correcting whatever situation is causing the error so the user doesn't see it. If that is not possible, you can modify the Groovy code itself to put a try/catch block around the whole thing to silence the error, like this: try { ... do some stuff ... } catch( Exception e ) { ... maybe do something with the error ... return "ERROR" } What is the operation that you're trying to do which is causing the error?
Create an account or sign in to comment