question

Gui Vaccaro avatar image
0 Likes"
Gui Vaccaro asked Jason Lightfoot commented

Disabling silent error handling?

Hello,

When FlexSim runs, several exceptions are silent to the user. For instance, if by code one tries to find or create an object with an invalid name or if find is used with a mistyped path. Is there a way to make these exceptions visible to the user during execution? Where could I find additional explanation about how to set it up, please?

This will facilitate model debugging and troubleshooting.

Thank you!

FlexSim 25.0.2
system consoleoutput consolecompiler consoleechoerror reporting
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Jason Lightfoot commented

The two examples you give are working as intended.

Object.create() does throw an exception if you pass in an invalid class name.

Model.find() does not throw an exception, but it returns null if the object doesn't exist. This allows you to check if objects exist without exceptions being thrown.

  1. treenode object = Model.find("DoesntExist");
  2. if (object)
  3. ...
  4. else
  5. ...


· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.