Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 16-Apr-2008 10:53
User is offline View Users Profile Print this message


Jim Spriggs

Posts: 16
Joined: 13-Dec-2006

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
Report this to a Moderator Report this to a Moderator
 16-Apr-2008 12:47
User is offline View Users Profile Print this message


Bernhard Gassner

Posts: 15
Joined: 27-Jun-2007

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.