gphoto2pp
A C++ Wrapper for libgphoto2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Macros
exceptions.hpp
Go to the documentation of this file.
1
25
#ifndef EXCEPTIONS_HPP
26
#define EXCEPTIONS_HPP
27
28
#include <stdexcept>
29
30
namespace
gphoto2pp
31
{
32
namespace
exceptions
33
{
38
class
GPhoto2ppException
:
public
std::runtime_error
39
{
40
public
:
41
GPhoto2ppException
(std::string&& message) : std::runtime_error(message) { }
42
};
43
48
class
gphoto2_exception
:
public
GPhoto2ppException
49
{
50
public
:
51
gphoto2_exception
(
int
result, std::string&& gp_result_string) :
GPhoto2ppException
(std::move(gp_result_string)),m_resultCode(result) { }
52
56
int
getResultCode
()
const
57
{
58
return
m_resultCode;
59
}
60
private
:
61
const
int
m_resultCode;
62
63
};
64
65
class
InvalidLinkedVersionException
:
public
GPhoto2ppException
66
{
67
public
:
68
InvalidLinkedVersionException
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
69
};
70
71
class
CameraWrapperException
:
public
GPhoto2ppException
72
{
73
public
:
74
CameraWrapperException
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
75
};
76
77
class
HelperException
:
public
GPhoto2ppException
78
{
79
public
:
80
HelperException
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
81
};
82
83
class
NoCameraFoundError
:
public
GPhoto2ppException
84
{
85
public
:
86
NoCameraFoundError
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
87
};
88
89
class
ArgumentException
:
public
GPhoto2ppException
90
{
91
public
:
92
ArgumentException
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
93
};
94
95
// Widget Exceptions
96
class
InvalidWidgetType
:
public
GPhoto2ppException
97
{
98
public
:
99
InvalidWidgetType
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
100
};
101
102
class
NullWidget
:
public
GPhoto2ppException
103
{
104
public
:
105
NullWidget
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
106
};
107
108
class
IndexOutOfRange
:
public
GPhoto2ppException
109
{
110
public
:
111
IndexOutOfRange
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
112
};
113
114
class
ValueOutOfLimits
:
public
GPhoto2ppException
115
{
116
public
:
117
ValueOutOfLimits
(std::string&& message) :
GPhoto2ppException
(std::move(message)) { }
118
};
119
120
121
}
122
}
123
124
#endif // EXCEPTIONS_HPP
include
exceptions.hpp
Generated on Wed May 7 2014 20:06:38 for gphoto2pp by
1.8.1.2