dcmtkpp
Public Types | Public Member Functions | List of all members
dcmtkpp::Exception Class Reference

Base class for dcmtkpp exceptions. More...

#include <Exception.h>

Inheritance diagram for dcmtkpp::Exception:

Public Types

enum  Source { Message, Condition }
 Source of the Exception: either a message string or an OFCondition.
 

Public Member Functions

 Exception (std::string const &message)
 Message string constructor, set the source to Source::Message.
 
 Exception (OFCondition const &condition)
 Condition constructor, set the source to Source::Condition.
 
virtual ~Exception () throw ()
 Destructor.
 
virtual const char * what () const throw ()
 Return the reason for the exception. More...
 
Source get_source () const
 Return the exception source.
 
OFCondition const & get_condition () const
 Return the condition that was used to create this exception. More...
 

Detailed Description

Base class for dcmtkpp exceptions.

Member Function Documentation

OFCondition const & dcmtkpp::Exception::get_condition ( ) const

Return the condition that was used to create this exception.

If the source is not Source::Condition, throw an exception.

char const * dcmtkpp::Exception::what ( ) const
throw (
)
virtual

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).


The documentation for this class was generated from the following files: