![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: RiCpp : how to insert try/catch in main()? Topic Summary: Is there any way to do this without setting CG:MainGenerationScheme=UserInitOnly? Created On: 16-Apr-2008 10:53 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
All I really want is to wrap the entire contents of the main() function in an outer try/catch block, so that my app can do something about uncaught exceptions.
Theoretically, I could simply set CG:MainGenerationScheme=UserInitializationOnly, and then write the entire contents of main() to suit my purpose. Unfortunately, however, we have several Configurations for the app, each of which specifies a different set of Initial Instances, so setting UserInitOnly would entail maintaining the code manually across those several Configurations, which I'd like to avoid if possible. Can anyone suggest another approach? Maybe there's some combination of CG properties that will achive the goal, but which I've not grokked so far? Thanks in advance for any clues! ------------------------- -- jim |
|
![]() |
|
![]() |
|
You can edit the files with the main() function in Rhapsody.
To do this, right-click on your configuration (in browser: project->Components->yourcomponent->Configurations->yourconfig) and select "Edit Configuration Main File" from the context menu. The only problem is, that this changes are static and you have to do it for each project/configuration. I have not found a way to do it in a generic way. Not sure if this solves your problem, but it's a possible clue. Greetings, Bernhard |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.