Odil
A C++11 library for the DICOM standard
|
#include <Exception.h>
Public Types | |
enum class | Source { Message , Condition } |
Source of the Exception: either a message string or an OFCondition. More... | |
Public Member Functions | |
Exception (std::string const &message) | |
Message string constructor, set the source to Source::Message. More... | |
Exception (OFCondition const &condition) | |
Condition constructor, set the source to Source::Condition. More... | |
virtual | ~Exception () noexcept |
Destructor. More... | |
Source | get_source () const |
Return the exception source. More... | |
OFCondition const & | get_condition () const |
Return the condition that was used to create this exception. More... | |
virtual const char * | what () const noexcept |
Return the reason for the exception. More... | |
![]() | |
Exception (std::string const &message="") | |
Message string constructor. More... | |
Additional Inherited Members | |
![]() | |
std::string | _message |
Message of the exception. More... | |
|
strong |
Source of the Exception: either a message string or an OFCondition.
Enumerator | |
---|---|
Message | |
Condition |
odil::dcmtk::Exception::Exception | ( | std::string const & | message | ) |
Message string constructor, set the source to Source::Message.
odil::dcmtk::Exception::Exception | ( | OFCondition const & | condition | ) |
Condition constructor, set the source to Source::Condition.
|
virtualnoexcept |
Destructor.
Reimplemented from odil::Exception.
OFCondition const& odil::dcmtk::Exception::get_condition | ( | ) | const |
Return the condition that was used to create this exception.
If the source is not Source::Condition, throw an exception.
Source odil::dcmtk::Exception::get_source | ( | ) | const |
Return the exception source.
|
virtualnoexcept |
Return the reason for the exception.
The reason for the exception is set to the message (for Source::Message) or to the text of the condition (for Source::Condition).
Reimplemented from odil::Exception.