OnixS Eurex ETI Handler C++ library  9.22.0
API documentation
Exception.h
Go to the documentation of this file.
1 /*
2  * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any
13  * part of this source code or associated reference material to any other location for further
14  * reproduction or redistribution, and any amendments to this copyright notice, are expressly
15  * prohibited.
16  *
17  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18  * the terms of the Agreement is a violation of copyright law.
19  */
20 
21 #pragma once
22 
23 #include "OnixS/Eurex/Trading/Export.h"
24 
25 #include <exception>
26 
27 namespace OnixS { namespace Eurex { namespace Trading {
28 
29 /// Basic exception class for this namespace
30 class ONIXS_EUREX_ETI_EXPORT Exception : public std::exception
31 {
32 public:
33  /// Constructor
34  Exception(const char* method_name, const char* message);
35 
36  /// Copy constructor
37  Exception(const Exception&);
38 
39  /// Destructor
40  ~Exception() throw();
41 
42  /// Assignment
43  Exception& operator=(const Exception&);
44 
45  /// Returns information about error
46  const char* what() const throw();
47 
48  /// Add information about context of exception
49  void touch(const char* method_name);
50 
51 private:
52  struct Implementation;
53 
54  Implementation* impl_;
55 };
56 
57 /// Argument value error
58 class ONIXS_EUREX_ETI_EXPORT ArgumentException : public Exception
59 {
60 public:
61  /// Constructor
62  ArgumentException(const char* source, const char* message);
63 
64  /// Constructor
65  ArgumentException(const char* source, const char* argument_name, const char* value, const char* comment = "");
66 
67  /// Constructor
68  ArgumentException(const char* source, const char* argument_name, int value, const char* comment = "");
69 
70  /// Constructor
71  ArgumentException(const char* source, const char* argument_name, unsigned int value, const char* comment = "");
72 
73  /// Constructor
74  ArgumentException(const char* source, const char* argument_name, double value, const char* comment = "");
75 };
76 
77 /// Null argument value error
78 class ONIXS_EUREX_ETI_EXPORT NullArgumentException : public ArgumentException
79 {
80 public:
81  /// Constructor
82  NullArgumentException(const char* source, const char* argument_name);
83 };
84 
85 /// Argument value range error
86 class ONIXS_EUREX_ETI_EXPORT ArgumentRangeException : public ArgumentException
87 {
88 public:
89  /// Constructor
90  ArgumentRangeException(const char* source, const char* message);
91 
92  /// Constructor
93  ArgumentRangeException(const char* source, const char* argument_name, int value, int min_value, int max_value);
94 
95  /// Constructor
97  const char* source,
98  const char* argument_name,
99  unsigned int value,
100  unsigned int min_value,
101  unsigned int max_value
102  );
103 
104  /// Constructor
105  ArgumentRangeException(const char* source, const char* argument_name, int value, unsigned int max_value);
106 
107  /// Constructor
108  ArgumentRangeException(const char* source, const char* argument_name, unsigned int value, unsigned int max_value);
109 
110  /// Constructor
112  const char* source,
113  const char* argument_name,
114  double value,
115  double min_value,
116  double max_value
117  );
118 };
119 
120 /// Operation exception
121 class ONIXS_EUREX_ETI_EXPORT OperationException : public Exception
122 {
123 public:
124  /// Constructor
125  OperationException(const char* source, const char* message);
126 
127  /// Constructor that accepts host and port information
128  OperationException(const char* source, const char* host, int port, const char* message);
129 };
130 
131 /// Method doesn't implemented
132 class ONIXS_EUREX_ETI_EXPORT NotImplementedException : public OperationException
133 {
134 public:
135  /// Constructor
136  NotImplementedException(const char* source);
137 };
138 }}}
Null argument value error.
Definition: Exception.h:78
Argument value range error.
Definition: Exception.h:86
Method doesn&#39;t implemented.
Definition: Exception.h:132
Basic exception class for this namespace.
Definition: Exception.h:30