[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Add undisplayable_exception

From: Vadim Zeitlin
Subject: Re: [lmi] [PATCH] Add undisplayable_exception
Date: Sat, 11 Oct 2014 18:38:46 +0200

On Sat, 11 Oct 2014 16:08:56 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2014-10-11 14:26Z, Greg Chicares wrote:
GC> > On 2014-10-09 19:00Z, Greg Chicares wrote:
GC> >> 
GC> >> Just one small question. Is there a reason why this extraordinary
GC> >> exception class should derive from std::runtime_error rather than
GC> >> from std::exception?
GC> > 
GC> > I assume that's okay, because [...]

 I was a bit surprised by you quoting your own message here and not my
reply, could it be that you had somehow missed it? Just in case you did,
please see http://lists.nongnu.org/archive/html/lmi/2014-10/msg00039.html
Sorry if you did see it already.

GC> Oh, wait--it really is better to derive from a <stdexcept> class,
GC> because that makes the implementation trivial:

 This is also a consideration but, frankly, not the main one. As I wrote in
the message above, I mainly have an impression that std::runtime_error is a
better fit for this class.

GC> you don't have to declare a std::string member and supply a definition
GC> of what() that uses that member. And std::runtime_error is a better fit
GC> than std::logic_error. Should I change this accordingly?

 Something does need to be changed: either the base class should be
returned back to std::runtime_error, or some "std::string m_what" field
should be added to the exception class, otherwise it is impossible to


reply via email to

[Prev in Thread] Current Thread [Next in Thread]