Exceptions: Difference between revisions

Content deleted Content added
Ce (talk | contribs)
m →‎Throw exceptions: pretty-printing
Ce (talk | contribs)
→‎Throw exceptions: std::bad_exception example function
Line 206:
// this function can only throw the types of exceptions that are listed
void foo2() throw(MyException)
{
throw MyException();
}
 
// this function turns any exceptions other than MyException into std::bad_exception
void foo3() throw(MyException, std::bad_exception)
{
throw MyException();