Stephen Torri:
> Do we have any guidelines about using C++ exceptions?

No, and we probably could have done with some because we're horribly 
inconsistent. 

I would say at a minimum:

- use them sparingly - only when a return code really isn't enough
- don't declare them in function prototypes, but do put a pseudo-declaration in 
a comment
- subclass from Rosegarden::Exception

We have several places that throw strings (ugh) or plain un-subclassed 
Exceptions (not so bad). 

We used to have a rule not to throw across Qt library boundaries because Qt 
might be compiled without exception support enabled.  It's maybe still worth 
following that one, although I think the justification is history. 


Chris


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to