libopenraw
lib
exception.hpp
1
/*
2
* libopenraw - exception.h
3
*
4
* Copyright (C) 2006-2014 Hubert Figuiere
5
*
6
* This library is free software: you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public License
8
* as published by the Free Software Foundation, either version 3 of
9
* the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see
18
* <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef OR_INTERNALS_EXCEPTION_H_
22
#define OR_INTERNALS_EXCEPTION_H_
23
24
#include <exception>
25
#include <string>
26
#include <typeinfo>
27
28
namespace
OpenRaw
{
29
namespace
Internals {
30
32
class
Exception
33
:
public
std::exception
34
{
35
protected
:
36
std::string m_what;
37
public
:
38
Exception
()
39
: std::exception(),
40
m_what()
41
{}
42
Exception
(
const
std::string &w)
43
: std::exception(),
44
m_what(w)
45
{}
46
virtual
~
Exception
()
47
{}
48
const
char
*what()
const
noexcept(
true
)
override
49
{
50
if
(m_what.empty()) {
51
return
typeid
(
this
).name();
52
}
53
return
m_what.c_str();
54
}
55
};
56
58
class
IOException
59
:
public
Exception
60
{
61
public
:
62
IOException
(
const
std::string &w)
63
:
Exception
(w)
64
{}
65
};
66
67
69
class
BadTypeException
70
:
public
Exception
71
{
72
73
};
74
76
class
TooBigException
77
:
public
Exception
78
{
79
};
80
81
class
OutOfRangeException
82
:
public
Exception
83
{
84
};
85
86
class
DecodingException
87
:
public
Exception
88
{
89
public
:
90
DecodingException
(
const
std::string &w)
91
:
Exception
(w)
92
{}
93
};
94
95
}
96
}
97
98
#endif
99
/*
100
Local Variables:
101
mode:c++
102
c-file-style:"stroustrup"
103
c-file-offsets:((innamespace . 0))
104
tab-width:2
105
c-basic-offset:2
106
indent-tabs-mode:nil
107
fill-column:80
108
End:
109
*/
OpenRaw
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard. I guess it failed.
Definition:
arwfile.cpp:30
OpenRaw::Internals::Exception
Definition:
exception.hpp:32
OpenRaw::Internals::BadTypeException
Definition:
exception.hpp:69
OpenRaw::Internals::TooBigException
Definition:
exception.hpp:76
OpenRaw::Internals::DecodingException
Definition:
exception.hpp:86
OpenRaw::Internals::OutOfRangeException
Definition:
exception.hpp:81
OpenRaw::Internals::IOException
Definition:
exception.hpp:58
Generated by
1.8.13