Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
Exception.h
Go to the documentation of this file.
1
/*************************************************************************
2
* odil - Copyright (C) Universite de Strasbourg
3
* Distributed under the terms of the CeCILL-B license, as published by
4
* the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6
* for details.
7
************************************************************************/
8
9
#ifndef _9e106372_aca6_4551_a591_95695eb00e4c
10
#define _9e106372_aca6_4551_a591_95695eb00e4c
11
12
#include <dcmtk/config/osconfig.h>
13
#include <dcmtk/ofstd/ofcond.h>
14
15
#include "
odil/Exception.h
"
16
#include "
odil/odil.h
"
17
18
namespace
odil
19
{
20
21
namespace
dcmtk
22
{
23
24
class
ODIL_API
Exception
:
public
odil::Exception
25
{
26
public
:
31
enum class
Source
{ Message, Condition };
32
34
Exception
(std::string
const
&
message
);
35
37
Exception
(OFCondition
const
& condition);
38
40
virtual
~Exception
() noexcept;
41
43
Source
get_source
() const;
44
50
OFCondition const &
get_condition
() const;
51
58
virtual const
char
*
what
() const noexcept;
59
private:
60
Source
_source;
61
OFCondition _condition;
62
};
63
64
}
65
66
}
67
68
#endif
// _9e106372_aca6_4551_a591_95695eb00e4c
69
Exception.h
odil::Exception
Base class for odil exceptions.
Definition
Exception.h:22
odil::dcmtk::Exception::Source
Source
Source of the Exception: either a message string or an OFCondition.
Definition
Exception.h:31
odil::dcmtk::Exception::~Exception
virtual ~Exception() noexcept
Destructor.
odil::dcmtk::Exception::Exception
Exception(OFCondition const &condition)
Condition constructor, set the source to Source::Condition.
odil::dcmtk::Exception::get_condition
OFCondition const & get_condition() const
Return the condition that was used to create this exception.
odil::dcmtk::Exception::what
virtual const char * what() const noexcept
Return the reason for the exception.
odil::dcmtk::Exception::get_source
Source get_source() const
Return the exception source.
odil::dcmtk::Exception::Exception
Exception(std::string const &message)
Message string constructor, set the source to Source::Message.
odil::dcmtk
Definition
conversion.h:25
odil::message
Definition
Cancellation.h:21
odil
Definition
Association.h:25
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
src
odil
dcmtk
Exception.h
Generated by
1.17.0