This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++/10093: Regression: Setting failbit in exceptions doesn'twork


Martin Sebor writes:
 > Jerry Quinn wrote:
 > > Where are we on this issue?  I'm happy to fix up the code to work the
 > > way people want it, but there should be agreement on the desired
 > > behavior.  I'm a bit lost on what the consensus is for exception
 > > handling behavior.
 > 
 > I'm not sure where "we" are :) The only debatable point I recall
 > was about catching all exceptions or some. The standard says to
 > catch only those from streambuf members. I feel that all should
 > be caught. I think Petur agreed. Was there anything else?

Yup :-)  The implementation as is catches everything that is an
instance of exception.  But it only rethrows the exception if ios::badbit
is set in the exception mask.

The bug filed was about the fact that if ios::failbit is set in the
exception mask and we throw an error, it doesn't get rethrown.  So the
question is what other conditions should result in rethrowing the
exception.

Also, are you and Petur saying that we should just have a catch() that
catches everything?  I guess we then use rtti before deciding if it of
class exception and whether to rethrow or not.

Later,
Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]