OnixS C++ Tullett Prebon SURF Handler  1.6.1
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/SURF/MarketData/Export.h>
24 
25 #include <exception>
26 
27 namespace OnixS { namespace SURF { namespace MarketData {
28 
29 /// Basic exception class for this namespace
30 class ONIXS_TP_SURF_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  Implementation* impl_;
54 };
55 
56 /// Argument value error
57 class ONIXS_TP_SURF_EXPORT ArgumentException : public Exception
58 {
59 public:
60  /// Constructor
61  ArgumentException(const char* source, const char* message);
62 
63  /// Constructor
65  const char* source,
66  const char* argument_name,
67  const char* value,
68  const char* comment = ""
69  );
70 
71  /// Constructor
73  const char* source,
74  const char* argument_name,
75  int value,
76  const char* comment = ""
77  );
78 
79  /// Constructor
81  const char* source,
82  const char* argument_name,
83  unsigned int value,
84  const char* comment = ""
85  );
86 
87  /// Constructor
89  const char* source,
90  const char* argument_name,
91  double value,
92  const char* comment = ""
93  );
94 };
95 
96 /// Null argument value error
97 class ONIXS_TP_SURF_EXPORT NullArgumentException : public ArgumentException
98 {
99 public:
100  /// Constructor
101  NullArgumentException(const char* source, const char* argument_name);
102 };
103 
104 /// Argument value range error
105 class ONIXS_TP_SURF_EXPORT ArgumentRangeException : public ArgumentException
106 {
107 public:
108  /// Constructor
109  ArgumentRangeException(const char* source, const char* message);
110 
111  /// Constructor
113  const char* source,
114  const char* argument_name,
115  int value,
116  int min_value,
117  int max_value
118  );
119 
120  /// Constructor
122  const char* source,
123  const char* argument_name,
124  unsigned int value,
125  unsigned int min_value,
126  unsigned int max_value
127  );
128 
129  /// Constructor
131  const char* source,
132  const char* argument_name,
133  int value,
134  unsigned int max_value
135  );
136 
137  /// Constructor
139  const char* source,
140  const char* argument_name,
141  unsigned int value,
142  unsigned int max_value
143  );
144 
145  /// Constructor
147  const char* source,
148  const char* argument_name,
149  double value,
150  double min_value,
151  double max_value
152  );
153 };
154 
155 /// Operation exception
156 class ONIXS_TP_SURF_EXPORT OperationException : public Exception
157 {
158 public:
159  /// Constructor
160  OperationException(const char* source, const char* message);
161 };
162 
163 /// Method doesn't implemented
164 class ONIXS_TP_SURF_EXPORT NotImplementedException : public OperationException
165 {
166 public:
167  /// Constructor
168  NotImplementedException(const char* source);
169 };
170 
171 }}} // namespace OnixS::SURF::MarketData
Method doesn&#39;t implemented.
Definition: Exception.h:164
Basic exception class for this namespace.
Definition: Exception.h:30
Definition: Decimal.h:28