Jive reference manual
|
Provides a single superclass for all exceptions in Jem. More...
#include <jem/base/Throwable.h>
Public Member Functions | |
Throwable (const String &place=String(), Const String &msg=String()) | |
Creates a new Throwable instance. More... | |
Throwable (const Throwable &rhs) | |
Creates a copy of another Throwable instance. More... | |
~Throwable () | |
Destructor. More... | |
virtual String | where () const |
Returns a string describing the context in which this Throwable was thrown. More... | |
virtual String | what () const |
Returns a string describing why this Throwable was thrown. More... | |
virtual String | name () const |
Returns the class name of this exception. More... | |
All objects thrown by jem are instances of the Throwable
class or one of its derived classes. This means that the try-block
will catch all exceptions thrown by jem.
By convention, classes derived from the Throwable
class provide a constructor that takes two strings as its arguments: one that describes the context in which the exception occured, and one that describes the cause of the exception. The first string is typically the name of a function and can be generated automatically by using the macro JEM_FUNC
. This macro expands to a static, null-terminated character array containing the name of the current function. Example:
Here, the macro JEM_FUNC
will expand to `Vector::get( int i ) const
', or something similar.
|
explicit |
jem::Throwable::Throwable | ( | const Throwable & | rhs | ) |
jem::Throwable::~Throwable | ( | ) |
Deallocates all privately allocated memory.
|
virtual |
|
virtual |
|
virtual |
Returns the full class name – including namespaces – of this Throwable
instance. This function should be overriden by derived classes. For instance, a class named flip::FlopException
should return the string "flip::FlopException"
.
Reimplemented in jive::fem::MeshCutter::Exception, jive::solver::SolverException, jem::util::PropertyException, jem::RuntimeException, jem::Exception, jem::ParseException, jem::io::IOException, jive::solver::IterativeSolverException, jive::model::ActionException, jive::util::ItemIDException, jem::io::CancelledIOException, jem::gl::GLException, jem::MemoryError, jem::hdf5::H5Exception, jem::IllegalIndexException, jem::xml::ParserException, jem::gl::TextureException, jem::mp::AbortException, jem::Error, jive::fem::InvalidBlocksException, jive::mp::InvalidBordersException, jive::util::TableException, jem::gl::DisplayException, jem::io::EOFException, jem::io::FileOpenException, jem::io::IOverflowException, jem::io::SerializationException, jem::io::SyncFailedException, jem::io::ZipException, jem::numeric::FuncException, jem::CancelledException, jem::mp::DriverException, jem::mp::MPException, jem::util::DateException, jem::ArithmeticException, jem::ClassCastException, jem::IllegalArgumentException, jem::IllegalInputException, jem::IllegalOperationException, jem::InstantiationException, jem::OutOfMemoryException, jem::PrecheckException, jem::RangeException, jem::SystemException, jem::util::EmptySequenceException, jem::AssertException, and jem::NullPointerException.