middle-end/8405: GCC 3.2: 'throw "exception";' not caught by catch
bangerth@dealii.org
bangerth@dealii.org
Wed Oct 30 12:55:00 GMT 2002
Synopsis: GCC 3.2: 'throw "exception";' not caught by catch
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Wed Oct 30 12:55:51 2002
State-Changed-Why:
Not a bug. An exception specification attached to a function
does not imply any conversion of the exception actually thrown.
You have to throw std::string("something").
The program aborts since the exception actually thrown
does not match the exception specification of the function.
I don't know it right off my head what happens exactly in
this case (look it up in any book on C++), but this leads
either to raising a special exception or calling
uncaught_exception or some such function. In any case,
the catch(...) clause is not invoked in this case.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8405
More information about the Gcc-prs
mailing list