File kernel/src/utils/SiconosException.hpp#
Go to the source code of this file
!
Tools to deal with exceptions in Siconos.
Defines
-
THROW_EXCEPTION(X)#
Wrap exception throwing inside Siconos.
-
namespace siconos
-
class exception : public virtual std::exception, public virtual boost::exception#
- #include <SiconosException.hpp>
Siconos generic exception.
Usage :
1/ to throw an exception, use : THROW_EXCEPTION(“some message”) or THROW_EXCEPTION()
2/ to catch it :
try{ … // call to functions that may throw exceptions } catch(siconos::exception::Exception& e) { siconos::exception::process(e); } catch(…) { siconos::exception::process(); }
The outputs are : the file, position in the file (line number) and function name that thrown the exception, the errno code (0 if unknown), the corresponding description of errno code (if any), the message added when the exception has been thrown.
Public Types
-
class exception : public virtual std::exception, public virtual boost::exception#