OTX-Runtime for C++  
Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h
1 #ifndef OpenTestSystem_Otx_Runtime_Api_DataTypes_Exception_H
2 #define OpenTestSystem_Otx_Runtime_Api_DataTypes_Exception_H
3 
4 #include "ApiDefs.h"
5 #include <string>
6 #include <typeinfo>
7 #include <list>
8 #include <stdexcept>
9 
10 #ifdef _MSC_VER
11 #pragma warning (disable : 4275) //disable warning when inherit from std::runtime_error
12 #pragma warning (disable : 4251) //disable warning when export DLL
13 #endif
14 
15 namespace OpenTestSystem { namespace Otx { namespace Runtime { namespace Api {
19  namespace Exceptions {
23  class API_EXPORTS Exception : public std::runtime_error
24  {
25  public:
30 
35  Exception(const std::string &message);
36 
40  virtual ~Exception();
41  };
42 
46  class API_EXPORTS RuntimeException : public Exception
47  {
48  public:
53 
58  RuntimeException(const std::string &message);
59  };
60 
64  class API_EXPORTS OtxException : public RuntimeException
65  {
66  private:
67  std::string _otxType;
68  public:
73 
79  OtxException(const std::string &otxType, const std::string &message);
80 
85  std::string GetOtxType() const;
86  };
87 
91  class API_EXPORTS InvalidLiteralException : public Exception
92  {
93  public:
98 
103  InvalidLiteralException(const std::string & message);
104  };
105 
109  class API_EXPORTS InvalidDataTypeException : public Exception
110  {
111  public:
116 
121  InvalidDataTypeException(const std::string& message);
122  };
123 
127  class API_EXPORTS FileNotFoundException : public Exception
128  {
129  public:
134 
139  FileNotFoundException(const std::string & message);
140  };
141 
145  class API_EXPORTS InvalidLicenseException : public Exception
146  {
147  public:
152 
157  InvalidLicenseException(const std::string & message);
158  };
159 
163  class API_EXPORTS FileFormatException : public Exception
164  {
165  public:
170 
175  FileFormatException(const std::string& message);
176  };
177 
181  class API_EXPORTS ConnectionStateException : public Exception
182  {
183  public:
188 
193  ConnectionStateException(const std::string& messagge);
194  };
195 
199  class API_EXPORTS OutOfBoundsException : public Exception
200  {
201  public:
206 
211  OutOfBoundsException(const std::string& message);
212  };
213 
217  class API_EXPORTS RunnerNotAliveException : public RuntimeException
218  {
219  public:
224 
229  RunnerNotAliveException(const std::string& message);
230  };
231 }}}}}
232 #endif
Thrown when the connection state produces an Exception.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:182
ConnectionStateException()
Initializes a new instance of the ConnectionStateException class.
ConnectionStateException(const std::string &messagge)
Initializes a new instance of the ConnectionStateException class.
Base class of Exceptions of Api.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:24
Exception(const std::string &message)
Initializes a new instance of Exception class.
Exception()
Initializes a new instance of Exception class.
Thrown when a file is has an unsupported format
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:164
FileFormatException(const std::string &message)
Initializes a new instance of the FileFormatException class.
FileFormatException()
Initializes a new instance of the FileFormatException class.
Thrown when a file cannot be found.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:128
FileNotFoundException()
Initializes a new instance of the FileNotFoundException class.
FileNotFoundException(const std::string &message)
Initializes a new instance of the FileNotFoundException class.
Thrown when converting non-otx api datatype into a string
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:110
InvalidDataTypeException()
Initializes a new instance of the InvalidDataTypeException class.
InvalidDataTypeException(const std::string &message)
Initializes a new instance of the InvalidDataTypeException class.
Thrown when a license of runtimeManager Api is not valid or expired
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:146
InvalidLicenseException()
Initializes a new instance of the InvalidLicenseException class.
InvalidLicenseException(const std::string &message)
Initializes a new instance of the InvalidLicenseException class.
Thrown when a literal string cannot be converted to OTX Object.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:92
InvalidLiteralException()
Initializes a new instance of the InvalidLiteralException class.
InvalidLiteralException(const std::string &message)
Initializes a new instance of the InvalidLiteralException class.
Thrown when within an OTX sequence an OTX is not handled.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:65
OtxException(const std::string &otxType, const std::string &message)
Initializes a new instance of the OtxException class.
OtxException()
Initializes a new instance of the OtxException class.
std::string GetOtxType() const
Gets the OTX type of the exception.
Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector,...
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:200
OutOfBoundsException(const std::string &message)
Initializes a new instance of the OutOfBoundsException class.
OutOfBoundsException()
Initializes a new instance of the OutOfBoundsException class.
Thrown when a runner is not alive anymore.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:218
RunnerNotAliveException()
Initializes a new instance of the RunnerNotAliveException class.
RunnerNotAliveException(const std::string &message)
Initializes a new instance of the RunnerNotAliveException class.
Thrown when OTX-Runtime produces an Exception.
Definition: Workspace/Products/OpenTestSystem/trunk/src/Cpp/otxruntime/OpenTestSystem.Otx.Runtime.Api/include/public/Exceptions/Exception.h:47
RuntimeException()
Initializes a new instance of RuntimeException class.
RuntimeException(const std::string &message)
Initializes a new instance of RuntimeException class.
Namespace containing all objects related to testing inside automotive industry