This is a follow-up on my previous issue with exceptions.
After spending more time on it, I found a minimal set of
changes that resolve the situation.
1. In the api/Cpp directory, in all files remove all
instances of "throw()" from function declarations.
2. However, in api/Cpp/FSMException.h, the following
destructor had to be added to the FSMException class:
~FSMException() throw() {}
3. The generated Cpp code required all instances
of "throw()" removed from all function declarations.
4. The generated Cpp code required the type of the
variable in the catch clauses to be changed from
FSMException to FSMException*.
The attached zip file contains a diff report,
newcatch.diff, and a copy of each modified file, including
generated files.
Using the FSMIsEven example as a template, I worked
up an enhanced version to test the code. These files are
also in the zip: test.fsm, main_FSMIsEven.h, and
main_FSMIsEven.cpp
Changes to 'catch' and enhanced FSMIsEven example
Logged In: YES
user_id=595910
Yes, it's a known problem.
Let's discuss it a bit further, before I patch the CPP generator.
I'd like to be sure that the generated code compiles on all the
platforms. So, if you modify the generated code, let me know:
which compiler, which error, which modification.