Menu

#5 MODIFICATIONS TO GENERATED CODE

open
nobody
9
2004-01-22
2003-12-01
Steve Waldo
No

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

Discussion

  • Steve Waldo

    Steve Waldo - 2003-12-01

    Changes to 'catch' and enhanced FSMIsEven example

     
  • Pavel Bekkerman

    Pavel Bekkerman - 2004-01-22
    • priority: 5 --> 9
     
  • Pavel Bekkerman

    Pavel Bekkerman - 2004-01-22

    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.

     
  • Pavel Bekkerman

    Pavel Bekkerman - 2004-01-22
    • summary: Follow-up on exceptions --> MODIFICATIONS TO GENERATED CODE
     

Log in to post a comment.

Monday.com Logo