OnixS C++ CBOE CFE Binary Order Entry (BOE) Handler  1.11.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 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 
23 
24 #include <exception>
25 
26 namespace OnixS {
27 namespace CboeCFE {
28 namespace Trading {
29 namespace BOE {
30 
31 /// Basic exception class for this namespace
32 ///
33 class ONIXS_CBOE_CFE_BOE_THROWABLE Exception: public std::exception
34 {
35 public:
36  /// Constructor
37  ///
38  Exception (const char* method_name, const char* message);
39 
40  /// Copy constructor
41  ///
42  Exception (const Exception&);
43 
44  /// Destructor
45  ///
46  ~Exception() ONIXS_BATS_BOE_NOTHROW;
47 
48  /// Assignment
49  ///
50  Exception& operator = (const Exception&);
51 
52  /// Returns information about error
53  ///
54  const char* what() const ONIXS_BATS_BOE_NOTHROW ONIXS_BATS_BOE_OVERRIDE;
55 
56  /// Add information about context of exception
57  ///
58  void touch (const char* method_name);
59 
60 private:
61  struct Implementation;
62 
63  Implementation* impl_;
64 };
65 
66 /// Argument value error
67 ///
69 {
70 public:
71  /// Constructor
72  ///
73  ArgumentException (const char* source, const char* message);
74 
75  /// Constructor
76  ///
77  ArgumentException (const char* source, const char* argument_name, const char* value, const char* comment = "");
78 
79  /// Constructor
80  ///
81  ArgumentException (const char* source, const char* argument_name, int value, const char* comment = "");
82 
83  /// Constructor
84  ///
85  ArgumentException (const char* source, const char* argument_name, unsigned int value, const char* comment = "");
86 
87  /// Constructor
88  ///
89  ArgumentException (const char* source, const char* argument_name, double value, const char* comment = "");
90 };
91 
92 /// Null argument value error
93 ///
95 {
96 public:
97  /// Constructor
98  ///
99  NullArgumentException (const char* source, const char* argument_name);
100 };
101 
102 /// Argument value range error
103 ///
105 {
106 public:
107  /// Constructor
108  ///
109  ArgumentRangeException (const char* source, const char* message);
110 
111  /// Constructor
112  ///
113  ArgumentRangeException (const char* source, const char* argument_name, int value, int min_value, int max_value);
114 
115  /// Constructor
116  ///
117  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int min_value, unsigned int max_value);
118 
119  /// Constructor
120  ///
121  ArgumentRangeException (const char* source, const char* argument_name, int value, unsigned int max_value);
122 
123  /// Constructor
124  ///
125  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int max_value);
126 
127  /// Constructor
128  ///
129  ArgumentRangeException (const char* source, const char* argument_name, double value, double min_value, double max_value);
130 };
131 
132 /// Operation exception
133 ///
135 {
136 public:
137  /// Constructor
138  ///
139  OperationException (const char* source, const char* message);
140 };
141 
142 }
143 }
144 }
145 }
#define ONIXS_CBOE_CFE_BOE_THROWABLE
Definition: ABI.h:34