casacore
|
Exception handling. More...
Modules | |
Exceptions_module_internal_classes | |
Internal Exceptions_module classes and functions. | |
Classes | |
class | casacore::AipsError |
Base class for all Casacore library errors. More... | |
class | casacore::AllocError |
Allocation errors. More... | |
class | casacore::IndexError |
Base class for all indexing errors. More... | |
class | casacore::indexError< t > |
Index errors returning the bad index. More... | |
class | casacore::DuplError |
Duplicate key errors. More... | |
class | casacore::duplError< t > |
Duplicate key errors where the bad key is returned. More... | |
class | casacore::SystemCallError |
Exception for an error in a system call. More... | |
class | casacore::AbortError |
Exception which halts execution. More... | |
class | casacore::InitError |
Initialization error, typically of static data shared between objects. More... | |
Exception handling.
See below for an overview of the classes in this module.
This module provides the exception handling mechanism used in Casacore. It allows the user to define new exception types and to throw
, catch
, and rethrow
these exceptions. The interface to this exception handling mechanism is very similary to the ANSI standard exceptions. This will make it easy to switch when the time comes.
This module supplies several (see (file="Error.h"))common exception types. These provide examples for creating new errors.
At some point, this exception mechanism will probably be replaced with compiler supported exceptions.
This example shows how a more specific exception can be caught as a more general exception: