OnixS C++ Tradeweb Approved Publication Arrangement (APA) Handler  1.2.2.18
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 {
28  namespace Tradeweb
29  {
30  namespace MarketData
31  {
32  namespace Apa
33  {
34  /// Basic exception class for this namespace
35  class ONIXS_TRADEWEB_APA_THROWABLE Exception: public std::exception
36  {
37  public:
38  /// Constructor
39  Exception (const char* method_name, const char* message);
40 
41  /// Copy constructor
42  Exception (const Exception&);
43 
44  /// Destructor
45  ~Exception () throw ();
46 
47  /// Assignment
48  Exception& operator = (const Exception&);
49 
50  /// Returns information about error
51  const char* what () const throw ();
52 
53  /// Add information about context of exception
54  void touch (const char* method_name);
55 
56  private:
57  struct Implementation;
58 
59  Implementation* impl_;
60  };
61 
62  /// Argument value error
64  {
65  public:
66  /// Constructor
67  ArgumentException (const char* source, const char* message);
68 
69  /// Constructor
70  ArgumentException (const char* source, const char* argument_name, const char* value, const char* comment = "");
71 
72  /// Constructor
73  ArgumentException (const char* source, const char* argument_name, int value, const char* comment = "");
74 
75  /// Constructor
76  ArgumentException (const char* source, const char* argument_name, unsigned int value, const char* comment = "");
77 
78  /// Constructor
79  ArgumentException (const char* source, const char* argument_name, double value, const char* comment = "");
80  };
81 
82  /// Null argument value error
84  {
85  public:
86  /// Constructor
87  NullArgumentException (const char* source, const char* argument_name);
88  };
89 
90  /// Argument value range error
92  {
93  public:
94  /// Constructor
95  ArgumentRangeException (const char* source, const char* message);
96 
97  /// Constructor
98  ArgumentRangeException (const char* source, const char* argument_name, int value, int min_value, int max_value);
99 
100  /// Constructor
101  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int min_value, unsigned int max_value);
102 
103  /// Constructor
104  ArgumentRangeException (const char* source, const char* argument_name, int value, unsigned int max_value);
105 
106  /// Constructor
107  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int max_value);
108 
109  /// Constructor
110  ArgumentRangeException (const char* source, const char* argument_name, double value, double min_value, double max_value);
111  };
112 
113  /// Operation exception
115  {
116  public:
117  /// Constructor
118  OperationException (const char* source, const char* message);
119  };
120 
121  /// Method doesn't implemented
123  {
124  public:
125  /// Constructor
126  NotImplementedException (const char* source);
127  };
128  }
129  }
130  }
131 }
132 
133 
134 
135 
#define ONIXS_TRADEWEB_APA_THROWABLE
Definition: ABI.h:33
Basic exception class for this namespace.
Definition: Exception.h:35