OnixS C++ MTS Repo SDP Handler  1.3.2.8
API documentation
Exception.h
Go to the documentation of this file.
1 #pragma once
2 /*
3 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4 *
5 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6 * and international copyright treaties.
7 *
8 * Access to and use of the software is governed by the terms of the applicable OnixS Software
9 * Services Agreement (the Agreement) and Customer end user license agreements granting
10 * a non-assignable, non-transferable and non-exclusive license to use the software
11 * for it's own data processing purposes under the terms defined in the Agreement.
12 *
13 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14 * of this source code or associated reference material to any other location for further reproduction
15 * or redistribution, and any amendments to this copyright notice, are expressly 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 #include <OnixS/MTS/Repo/SDP/ABI.h>
22 
23 #include <exception>
24 
25 namespace OnixS {
26 namespace Mts {
27 namespace Repo {
28 namespace SDP {
29 
30 /// Basic exception class for this namespace
31 ///
32 class ONIXS_MTS_REPO_SDP_THROWABLE Exception: public std::exception
33 {
34 public:
35  /// Constructor
36  ///
37  Exception (const char* method_name, const char* message);
38 
39  /// Copy constructor
40  ///
41  Exception (const Exception&);
42 
43  /// Destructor
44  ///
45  ~Exception () throw ();
46 
47  /// Assignment
48  ///
49  Exception& operator = (const Exception&);
50 
51  /// Returns information about error
52  ///
53  const char* what () const throw ();
54 
55  /// Add information about context of exception
56  ///
57  void touch (const char* method_name);
58 
59 private:
60  struct Implementation;
61 
62  Implementation* impl_;
63 };
64 
65 /// Argument value error
66 ///
68 {
69 public:
70  /// Constructor
71  ///
72  ArgumentException (const char* source, const char* message);
73 
74  /// Constructor
75  ///
76  ArgumentException (const char* source, const char* argument_name, const char* value, const char* comment = "");
77 
78  /// Constructor
79  ///
80  ArgumentException (const char* source, const char* argument_name, int value, const char* comment = "");
81 
82  /// Constructor
83  ///
84  ArgumentException (const char* source, const char* argument_name, unsigned int value, const char* comment = "");
85 
86  /// Constructor
87  ///
88  ArgumentException (const char* source, const char* argument_name, double value, const char* comment = "");
89 };
90 
91 /// Null argument value error
92 ///
94 {
95 public:
96  /// Constructor
97  ///
98  NullArgumentException (const char* source, const char* argument_name);
99 };
100 
101 /// Argument value range error
102 ///
104 {
105 public:
106  /// Constructor
107  ///
108  ArgumentRangeException (const char* source, const char* message);
109 
110  /// Constructor
111  ///
112  ArgumentRangeException (const char* source, const char* argument_name, int value, int min_value, int max_value);
113 
114  /// Constructor
115  ///
116  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int min_value, unsigned int max_value);
117 
118  /// Constructor
119  ///
120  ArgumentRangeException (const char* source, const char* argument_name, int value, unsigned int max_value);
121 
122  /// Constructor
123  ///
124  ArgumentRangeException (const char* source, const char* argument_name, unsigned int value, unsigned int max_value);
125 
126  /// Constructor
127  ///
128  ArgumentRangeException (const char* source, const char* argument_name, double value, double min_value, double max_value);
129 };
130 
131 /// Operation exception
132 ///
134 {
135 public:
136  /// Constructor
137  ///
138  OperationException (const char* source, const char* message);
139 };
140 
141 /// Function is not implemented
142 ///
144 {
145 public:
146  /// Constructor
147  ///
148  NotImplementedException (const char* source);
149 };
150 
151 }
152 }
153 }
154 }
#define ONIXS_MTS_REPO_SDP_THROWABLE
Definition: ABI.h:50