OnixS Eurex EDCI Handler C++ library 1.0.0
Users' manual and API documentation
Loading...
Searching...
No Matches
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/DropCopy/Export.h>
24
25#include <exception>
26#include <string>
27
28namespace OnixS { namespace Eurex { namespace DropCopy {
29
31class ONIXS_EUREX_EDCI_EXPORT Exception : public std::exception
32{
33public:
35 Exception(const std::string& method_name, const std::string& message);
36
39
41 ~Exception() noexcept override;
42
44 Exception& operator=(const Exception&);
45
47 const char* what() const noexcept override;
48
50 void touch(const std::string& method_name);
51
52private:
53 struct Implementation;
54
55 Implementation* impl_;
56};
57
59class ONIXS_EUREX_EDCI_EXPORT ArgumentException : public Exception
60{
61public:
63 ArgumentException(const std::string& source, const std::string& message);
64
67 const std::string& source,
68 const std::string& argument_name,
69 const std::string& value,
70 const std::string& comment = ""
71 );
72
75 const std::string& source,
76 const std::string& argument_name,
77 int value,
78 const std::string& comment = ""
79 );
80
83 const std::string& source,
84 const std::string& argument_name,
85 unsigned int value,
86 const std::string& comment = ""
87 );
88
91 const std::string& source,
92 const std::string& argument_name,
93 double value,
94 const std::string& comment = ""
95 );
96};
97
99class ONIXS_EUREX_EDCI_EXPORT NullArgumentException : public ArgumentException
100{
101public:
103 NullArgumentException(const std::string& source, const std::string& argument_name);
104};
105
107class ONIXS_EUREX_EDCI_EXPORT ArgumentRangeException : public ArgumentException
108{
109public:
111 ArgumentRangeException(const std::string& source, const std::string& message);
112
115 const std::string& source,
116 const std::string& argument_name,
117 int value,
118 int min_value,
119 int max_value
120 );
121
124 const std::string& source,
125 const std::string& argument_name,
126 unsigned int value,
127 unsigned int min_value,
128 unsigned int max_value
129 );
130
133 const std::string& source,
134 const std::string& argument_name,
135 int value,
136 unsigned int max_value
137 );
138
141 const std::string& source,
142 const std::string& argument_name,
143 unsigned int value,
144 unsigned int max_value
145 );
146
149 const std::string& source,
150 const std::string& argument_name,
151 double value,
152 double min_value,
153 double max_value
154 );
155};
156
158class ONIXS_EUREX_EDCI_EXPORT OperationException : public Exception
159{
160public:
162 OperationException(const std::string& source, const std::string& message);
163
165 OperationException(const std::string& source, const std::string& host, int port, const std::string& message);
166};
167
169class ONIXS_EUREX_EDCI_EXPORT NotImplementedException : public OperationException
170{
171public:
173 NotImplementedException(const std::string& source);
174};
175
176}}} // namespace OnixS::Eurex::DropCopy
ArgumentException(const std::string &source, const std::string &message)
Constructor.
ArgumentException(const std::string &source, const std::string &argument_name, double value, const std::string &comment="")
Constructor.
ArgumentException(const std::string &source, const std::string &argument_name, int value, const std::string &comment="")
Constructor.
ArgumentException(const std::string &source, const std::string &argument_name, const std::string &value, const std::string &comment="")
Constructor.
ArgumentException(const std::string &source, const std::string &argument_name, unsigned int value, const std::string &comment="")
Constructor.
ArgumentRangeException(const std::string &source, const std::string &argument_name, unsigned int value, unsigned int min_value, unsigned int max_value)
Constructor.
ArgumentRangeException(const std::string &source, const std::string &argument_name, int value, int min_value, int max_value)
Constructor.
ArgumentRangeException(const std::string &source, const std::string &argument_name, double value, double min_value, double max_value)
Constructor.
ArgumentRangeException(const std::string &source, const std::string &message)
Constructor.
ArgumentRangeException(const std::string &source, const std::string &argument_name, unsigned int value, unsigned int max_value)
Constructor.
ArgumentRangeException(const std::string &source, const std::string &argument_name, int value, unsigned int max_value)
Constructor.
void touch(const std::string &method_name)
Add information about context of exception.
~Exception() noexcept override
Destructor.
const char * what() const noexcept override
Returns information about error.
Exception(const Exception &)
Copy constructor.
Exception(const std::string &method_name, const std::string &message)
Constructor.
NotImplementedException(const std::string &source)
Constructor.
NullArgumentException(const std::string &source, const std::string &argument_name)
Constructor.
OperationException(const std::string &source, const std::string &message)
Constructor.
OperationException(const std::string &source, const std::string &host, int port, const std::string &message)
Constructor that accepts host and port information.