Exception handling is a critical feature for any programming language, and it's especially important for complex simulation software like FlexSim. The current FlexScript API does not support modern exception handling, which can make simulations less reliable, more difficult to debug, and slower to perform.
I propose that the FlexSim team add modern exception handling to the FlexScript API. This would allow developers to:
- Try/catch/finally blocks: This would allow developers to handle exceptions explicitly, and to ensure that resources are cleaned up even if an exception occurs.
- Exception classes: This would allow developers to create custom exception classes to represent different types of errors.
- Stack traces: This would provide developers with detailed information about the call stack at the time an exception occurred.
I believe that the addition of modern exception handling would be a significant improvement to FlexSim.