question

Patricia_brenny R avatar image
1 Like"
Patricia_brenny R asked Patricia_brenny R commented

How to throw exceptions through SDK?

Hello,

I want to throw exceptions in C++ and have them show up at the exceptions tab, similar to FlexSim's own exceptions.

Is there any way to do that?

FlexSim 23.1.1
module sdkexceptionsdkmodule developmentdevelopment utility
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

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Patricia_brenny R commented

In many cases, it looks like you can throw a std::string or const char* as an exception. Here's an example from the AStar module, which is open source:

https://github.com/flexsim/AStar/blob/master/AStarDLL/AStarTypes.cpp#L516

· 1
5 |100000

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

Patricia_brenny R avatar image Patricia_brenny R commented ·
That helps a great deal, thanks a lot!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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