OnixS Eurex ETI Handler C++ library  9.10.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 part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include "OnixS/Eurex/Trading/Export.h"
23 
24 #include <exception>
25 
26 namespace OnixS {
27 namespace Eurex {
28 namespace Trading {
29 
30 /// Basic exception class for this namespace
31 class ONIXS_EUREX_ETI_EXPORT Exception: public std::exception
32 {
33 public:
34  /// Constructor
35  Exception (const char* method_name, const char* message);
36 
37  /// Copy constructor
38  Exception (const Exception&);
39 
40  /// Destructor
41  ~Exception () throw ();
42 
43  /// Assignment
44  Exception& operator = (const Exception&);
45 
46  /// Returns information about error
47  const char* what () const throw ();
48 
49  /// Add information about context of exception
50  void touch (const char* method_name);
51 
52 private:
53  struct Implementation;
54 
55  Implementation* impl_;
56 };
57 
58 /// Argument value error
59 class ONIXS_EUREX_ETI_EXPORT ArgumentException: public Exception
60 {
61 public:
62  /// Constructor
63  ArgumentException (const char* source, const char* message);
64 
65  /// Constructor
66  ArgumentException (const char* source, const char* argument_name, const char* value, const char* comment = "");
67 
68  /// Constructor
69  ArgumentException (const char* source, const char* argument_name, int value, const char* comment = "");
70 
71  /// Constructor
72  ArgumentException (const char* source, const char* argument_name, unsigned int value, const char* comment = "");
73 
74  /// Constructor
75  ArgumentException (const char* source, const char* argument_name, double value, const char* comment = "");
76 };
77 
78 /// Null argument value error
79 class ONIXS_EUREX_ETI_EXPORT NullArgumentException: public ArgumentException
80 {
81 public:
82  /// Constructor
83  NullArgumentException (const char* source, const char* argument_name);
84 };
85 
86 /// Argument value range error
87 class ONIXS_EUREX_ETI_EXPORT ArgumentRangeException: public ArgumentException
88 {
89 public:
90  /// Constructor
91  ArgumentRangeException (const char* source, const char* message);
92 
93  /// Constructor
94  ArgumentRangeException (const char* source, const char* argument_name, int value, int min_value, int max_value);
95 
96  /// Constructor
97  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int min_value, unsigned int max_value);
98 
99  /// Constructor
100  ArgumentRangeException (const char* source, const char* argument_name, int value, unsigned int max_value);
101 
102  /// Constructor
103  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int max_value);
104 
105  /// Constructor
106  ArgumentRangeException (const char* source, const char* argument_name, double value, double min_value, double max_value);
107 };
108 
109 /// Operation exception
110 class ONIXS_EUREX_ETI_EXPORT OperationException: public Exception
111 {
112 public:
113  /// Constructor
114  OperationException (const char* source, const char* message);
115 };
116 
117 /// Method doesn't implemented
118 class ONIXS_EUREX_ETI_EXPORT NotImplementedException: public OperationException
119 {
120 public:
121  /// Constructor
122  NotImplementedException (const char* source);
123 };
124 }
125 }
126 }
Null argument value error.
Definition: Exception.h:79
Argument value range error.
Definition: Exception.h:87
Method doesn&#39;t implemented.
Definition: Exception.h:118
Basic exception class for this namespace.
Definition: Exception.h:31