coriolis/hurricane/doc/hurricane/Exception.dox

40 lines
873 B
C++

// -*- C++ -*-
namespace Hurricane {
/*! \class Exception
* \brief Exception description (\b API)
*
* \section secExceptionIntro Introduction
*
* The Exception class groups all exceptions thrown by functions
* from the API. This virtual class is only useful to catch
* exceptions originating from one of those functions.
*
*
* \section secExceptionExample Example
*
\code
try {
// do something
}
catch (Exception& exception) {
// Go through here if the exception comes from a function of the API
cerr << exception << endl;
exit(1);
}
catch (...) {
// Go through here for all other system exceptions
cerr << Error("abnormal termination") << endl;
// We use the Error() in order to get the same kind of printing
exit(2);
}
\endcode
*/
}