2002 2003 2004 2005 <2006> 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 <2006> 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: 3.15 C++ Exception classes |
From: | Andrew Johnson <[email protected]> |
To: | EPICS core-talk <[email protected]> |
Date: | Tue, 21 Feb 2006 10:51:53 -0600 |
Benjamin Franksen wrote:
I am not convinced, neither by the argument above ("write a try/catch phrase that could catch warnings but not errors or fatalities") nor by the Jeff's design where the severity is a class member.IMHO, exceptions should not be classified at all into severity types.
I agree with you; as I said in my penultimate sentence:
> I'm also not convinced that the thrower can determine the severity of > an exception in practice.
I guess I didn't express all of the reasons for rejecting Jeff's severity() method. My suggestion about being able to catch warnings was not made because I want to do that, but to show that using the exception class hierarchy makes more sense than hiding warning/error information inside the exception object itself.
Instead, I would propose to create /one/ special exception type that is reserved for 'assert' style failures, i.e. failures that can only becaused by broken or corrupted code. IIRC, this is what a 'fatal' severity normally means in Jeff's code.
I think this is very similar to Kay's point, which I will respond to separately...
- Andrew -- There is no S in exprexxo.