Matt,

The only serious defense of exceptions I know of is that you can use them to
avoid the boilerplate you guys use heavily throughout your source
(CHKERRQ/SETERRQ).  As long as you remain committed to the boilerplate, I
can't think of anything that exceptions grant you in C style code.  As Barry
notes, they can be used to try and handle things in
constructors/destructors, but they are very dangerous in those methods and
only work when every data member can clean itself up (see:
http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.10)

-A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111019/a1548740/attachment.html>

Reply via email to