FaspManagerException.h
Go to the documentation of this file.
1 
7 #ifndef __FASP_MANAGER_EXCEPTION_H__
8 #define __FASP_MANAGER_EXCEPTION_H__
9 
10 #include "FaspManagerCommon.h"
11 #include <exception>
12 #include <string>
13 
14 namespace Aspera
15 {
16 namespace FaspManager
17 {
18 
20 class Exception
21 {
22  /* Member variables */
23  protected:
24 
26  std::string m_err_msg;
27 
28  /* Member functions */
29  public:
30 
32  FASP_MANAGER_API Exception( ) : m_err_msg( "Generic FASP exception" ) { };
33 
34 
38  FASP_MANAGER_API Exception( std::string err_msg ) : m_err_msg( err_msg ) { };
39 
41  FASP_MANAGER_API virtual ~Exception( ) { };
42 
46  FASP_MANAGER_API const char* GetErrMsg( ) const { return m_err_msg.c_str(); };
47 };
48 
49 
51 class SocketException : public Exception
52 {
53  /* Member functions */
54  public:
55 
57  FASP_MANAGER_API SocketException( ) : Exception( ) { };
58 
59 
63  FASP_MANAGER_API SocketException( std::string err_msg ) : Exception( err_msg ) { };
64 
66  FASP_MANAGER_API ~SocketException( ) { };
67 };
68 
70 class XferException : public Exception
71 {
72  /* Member functions */
73  public:
75  FASP_MANAGER_API XferException( ) : Exception( ) { };
76 
80 
81  FASP_MANAGER_API XferException( std::string err_msg ) : Exception( err_msg ) { };
82 
84  FASP_MANAGER_API ~XferException( ) { };
85 };
86 
89 {
90  /* Member functions */
91  public:
93  FASP_MANAGER_API InvalidOperationException( ) : Exception( ) { };
94 
99  FASP_MANAGER_API InvalidOperationException( std::string err_msg ) : Exception( err_msg ) { };
100 
102  FASP_MANAGER_API ~InvalidOperationException( ) { };
103 };
104 
107 {
108  /* Member functions */
109  public:
110 
112  FASP_MANAGER_API JobNotFoundException( ) : Exception( ) { };
113 
118  FASP_MANAGER_API JobNotFoundException( std::string err_msg ) : Exception( err_msg ) { };
119 
121  FASP_MANAGER_API ~JobNotFoundException( ) { };
122 };
123 
124 
126 class SendException : public Exception
127 {
128  /* Member functions */
129  public:
130 
132  FASP_MANAGER_API SendException( ) : Exception( ) { };
133 
138  FASP_MANAGER_API SendException( std::string err_msg ) : Exception( err_msg ) { };
139 
140 
142  FASP_MANAGER_API ~SendException( ) { };
143 };
144 
146 class StateException : public Exception
147 {
148  /* Member functions */
149  public:
151  FASP_MANAGER_API StateException( ) : Exception( ) { };
152 
157  FASP_MANAGER_API StateException( std::string err_msg ) : Exception( err_msg ) { };
158 
160  FASP_MANAGER_API ~StateException( ) { };
161 };
162 
165 {
166  /* Member functions */
167  public:
168 
170  FASP_MANAGER_API ValidationException( ) : Exception( ) { };
171 
176  FASP_MANAGER_API ValidationException( std::string err_msg ) : Exception( err_msg ) { };
177 
179  FASP_MANAGER_API ~ValidationException( ) { };
180 };
181 
182 } /* namespace FaspManager */
183 } /* namespace Aspera */
184 
185 #endif /* __FASP_MANAGER_EXCEPTION_H__ */
FASP_MANAGER_API JobNotFoundException(std::string err_msg)
Definition: FaspManagerException.h:118
FASP_MANAGER_API const char * GetErrMsg() const
Definition: FaspManagerException.h:46
A class to define a FASP Manager job not found related execption.
Definition: FaspManagerException.h:106
FASP_MANAGER_API ValidationException(std::string err_msg)
Definition: FaspManagerException.h:176
FASP_MANAGER_API JobNotFoundException()
Constructs this default FASP job not found exception.
Definition: FaspManagerException.h:112
FASP_MANAGER_API StateException()
Constructs this default FASP state exception.
Definition: FaspManagerException.h:151
A class to define a FASP Manager transfer related execption.
Definition: FaspManagerException.h:70
FASP_MANAGER_API ~SocketException()
Deconstructs this FASP socket exception.
Definition: FaspManagerException.h:66
A class providing a base for FASP management related exception handling.
Definition: FaspManagerException.h:20
FASP_MANAGER_API Exception()
Constructs this default FASP exception.
Definition: FaspManagerException.h:32
FASP_MANAGER_API ~ValidationException()
Deconstructs this FASP send exception.
Definition: FaspManagerException.h:179
FASP_MANAGER_API SendException()
Constructs this default FASP send exception.
Definition: FaspManagerException.h:132
FASP_MANAGER_API ~XferException()
Deconstructs this FASP transfer exception.
Definition: FaspManagerException.h:84
FASP_MANAGER_API XferException(std::string err_msg)
Definition: FaspManagerException.h:81
virtual FASP_MANAGER_API ~Exception()
Deconstructs this FASP exception.
Definition: FaspManagerException.h:41
FASP_MANAGER_API InvalidOperationException(std::string err_msg)
Definition: FaspManagerException.h:99
FASP_MANAGER_API SendException(std::string err_msg)
Definition: FaspManagerException.h:138
A class to define a FASP Manager validation exception.
Definition: FaspManagerException.h:164
C++ namespace for Aspera, Inc.
Definition: Environment.h:10
FASP_MANAGER_API ~SendException()
Deconstructs this FASP send exception.
Definition: FaspManagerException.h:142
FASP_MANAGER_API SocketException(std::string err_msg)
Definition: FaspManagerException.h:63
FASP_MANAGER_API ~InvalidOperationException()
Deconstructs this FASP state exception.
Definition: FaspManagerException.h:102
FASP_MANAGER_API Exception(std::string err_msg)
Definition: FaspManagerException.h:38
A class to define a FASP Manager socket related execption.
Definition: FaspManagerException.h:51
std::string m_err_msg
The error message associated with this FASP exception.
Definition: FaspManagerException.h:26
A class to define an invalid API operation.
Definition: FaspManagerException.h:88
FASP_MANAGER_API ~JobNotFoundException()
Deconstructs this FASP job not found exception.
Definition: FaspManagerException.h:121
FASP_MANAGER_API InvalidOperationException()
Constructs this default FASP state exception.
Definition: FaspManagerException.h:93
FASP_MANAGER_API ValidationException()
Constructs a default validation exception.
Definition: FaspManagerException.h:170
FASP_MANAGER_API StateException(std::string err_msg)
Definition: FaspManagerException.h:157
FASP_MANAGER_API ~StateException()
Deconstructs this FASP state exception.
Definition: FaspManagerException.h:160
FASP_MANAGER_API SocketException()
Constructs this default FASP socket exception.
Definition: FaspManagerException.h:57
A class to define a FASP state related exception.
Definition: FaspManagerException.h:146
A class to define a FASP Manager send related exception.
Definition: FaspManagerException.h:126
FASP_MANAGER_API XferException()
Constructs this default FASP transfer exception.
Definition: FaspManagerException.h:75

Copyright © 2005 - 2016 Aspera, an IBM company. | asperasoft.com