Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Exception.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'Exception.ice'.</auto-generated>
5// clang-format off
6
7#ifndef IceGrid_Exception_h_
8#define IceGrid_Exception_h_
9
11#include <Ice/Ice.h>
12#include <Ice/Identity.h>
13#include <IceGrid/Config.h>
14
15#ifndef ICE_DISABLE_VERSION
16# if ICE_INT_VERSION != 30850
17# error Ice version mismatch: an exact match is required for beta generated code
18# endif
19#endif
20
21#ifndef ICEGRID_API
22# if defined(ICEGRID_API_EXPORTS)
23# define ICEGRID_API ICE_DECLSPEC_EXPORT
24# else
25# define ICEGRID_API ICE_DECLSPEC_IMPORT
26# endif
27#endif
28
29// NOLINTBEGIN(modernize-concat-nested-namespaces)
30
31namespace IceGrid
32{
33}
34
35namespace IceGrid
36{
37 /// The exception that is thrown when IceGrid does not know an application with the provided name.
38 /// @headerfile IceGrid/IceGrid.h
40 {
41 public:
42 /// Default constructor.
43 ApplicationNotExistException() noexcept = default;
44
45 /// One-shot constructor to initialize all data members.
46 /// @param name The name of the application.
47 ApplicationNotExistException(std::string name) noexcept :
48 name(std::move(name))
49 {
50 }
51
52 /// Copy constructor.
54
55 /// Creates a tuple with all the fields of this exception.
56 /// @return A tuple with all the fields of this exception.
57 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
58 {
59 return std::tie(name);
60 }
61
62 void ice_printFields(std::ostream& os) const override;
63 /// Gets the type ID of the associated Slice exception.
64 /// @return The string `"::IceGrid::ApplicationNotExistException"`.
65 static const char* ice_staticId() noexcept;
66
67 [[nodiscard]] const char* ice_id() const noexcept override;
68
69 void ice_throw() const override;
70
71 /// The name of the application.
72 std::string name;
73
74 protected:
75 /// @private
76 void _writeImpl(Ice::OutputStream*) const override;
77
78 /// @private
79 void _readImpl(Ice::InputStream*) override;
80 };
81
82 /// The exception that is thrown when IceGrid does not know a server with the provided server ID.
83 /// @headerfile IceGrid/IceGrid.h
84 class ICEGRID_API ServerNotExistException : public Ice::UserException
85 {
86 public:
87 /// Default constructor.
88 ServerNotExistException() noexcept = default;
89
90 /// One-shot constructor to initialize all data members.
91 /// @param id The server ID.
92 ServerNotExistException(std::string id) noexcept :
93 id(std::move(id))
94 {
95 }
96
97 /// Copy constructor.
99
100 /// Creates a tuple with all the fields of this exception.
101 /// @return A tuple with all the fields of this exception.
102 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
103 {
104 return std::tie(id);
105 }
106
107 void ice_printFields(std::ostream& os) const override;
108 /// Gets the type ID of the associated Slice exception.
109 /// @return The string `"::IceGrid::ServerNotExistException"`.
110 static const char* ice_staticId() noexcept;
111
112 [[nodiscard]] const char* ice_id() const noexcept override;
113
114 void ice_throw() const override;
115
116 /// The server ID.
117 std::string id;
118
119 protected:
120 /// @private
121 void _writeImpl(Ice::OutputStream*) const override;
122
123 /// @private
124 void _readImpl(Ice::InputStream*) override;
125 };
126
127 /// The exception that is thrown when a server failed to start.
128 /// @headerfile IceGrid/IceGrid.h
129 class ICEGRID_API ServerStartException : public Ice::UserException
130 {
131 public:
132 /// Default constructor.
133 ServerStartException() noexcept = default;
134
135 /// One-shot constructor to initialize all data members.
136 /// @param id The server ID.
137 /// @param reason The reason for the failure.
138 ServerStartException(std::string id, std::string reason) noexcept :
139 id(std::move(id)),
140 reason(std::move(reason))
141 {
142 }
143
144 /// Copy constructor.
145 ServerStartException(const ServerStartException&) noexcept = default;
146
147 /// Creates a tuple with all the fields of this exception.
148 /// @return A tuple with all the fields of this exception.
149 [[nodiscard]] std::tuple<const std::string&, const std::string&> ice_tuple() const
150 {
151 return std::tie(id, reason);
152 }
153
154 void ice_printFields(std::ostream& os) const override;
155 /// Gets the type ID of the associated Slice exception.
156 /// @return The string `"::IceGrid::ServerStartException"`.
157 static const char* ice_staticId() noexcept;
158
159 [[nodiscard]] const char* ice_id() const noexcept override;
160
161 void ice_throw() const override;
162
163 /// The server ID.
164 std::string id;
165
166 /// The reason for the failure.
167 std::string reason;
168
169 protected:
170 /// @private
171 void _writeImpl(Ice::OutputStream*) const override;
172
173 /// @private
174 void _readImpl(Ice::InputStream*) override;
175 };
176
177 /// The exception that is thrown when a server failed to stop.
178 /// @headerfile IceGrid/IceGrid.h
179 class ICEGRID_API ServerStopException : public Ice::UserException
180 {
181 public:
182 /// Default constructor.
183 ServerStopException() noexcept = default;
184
185 /// One-shot constructor to initialize all data members.
186 /// @param id The server ID.
187 /// @param reason The reason for the failure.
188 ServerStopException(std::string id, std::string reason) noexcept :
189 id(std::move(id)),
190 reason(std::move(reason))
191 {
192 }
193
194 /// Copy constructor.
195 ServerStopException(const ServerStopException&) noexcept = default;
196
197 /// Creates a tuple with all the fields of this exception.
198 /// @return A tuple with all the fields of this exception.
199 [[nodiscard]] std::tuple<const std::string&, const std::string&> ice_tuple() const
200 {
201 return std::tie(id, reason);
202 }
203
204 void ice_printFields(std::ostream& os) const override;
205 /// Gets the type ID of the associated Slice exception.
206 /// @return The string `"::IceGrid::ServerStopException"`.
207 static const char* ice_staticId() noexcept;
208
209 [[nodiscard]] const char* ice_id() const noexcept override;
210
211 void ice_throw() const override;
212
213 /// The server ID.
214 std::string id;
215
216 /// The reason for the failure.
217 std::string reason;
218
219 protected:
220 /// @private
221 void _writeImpl(Ice::OutputStream*) const override;
222
223 /// @private
224 void _readImpl(Ice::InputStream*) override;
225 };
226
227 /// The exception that is thrown when IceGrid does not know an object adapter with the provided adapter ID.
228 /// @headerfile IceGrid/IceGrid.h
229 class ICEGRID_API AdapterNotExistException : public Ice::UserException
230 {
231 public:
232 /// Default constructor.
233 AdapterNotExistException() noexcept = default;
234
235 /// One-shot constructor to initialize all data members.
236 /// @param id The adapter ID.
237 AdapterNotExistException(std::string id) noexcept :
238 id(std::move(id))
239 {
240 }
241
242 /// Copy constructor.
244
245 /// Creates a tuple with all the fields of this exception.
246 /// @return A tuple with all the fields of this exception.
247 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
248 {
249 return std::tie(id);
250 }
251
252 void ice_printFields(std::ostream& os) const override;
253 /// Gets the type ID of the associated Slice exception.
254 /// @return The string `"::IceGrid::AdapterNotExistException"`.
255 static const char* ice_staticId() noexcept;
256
257 [[nodiscard]] const char* ice_id() const noexcept override;
258
259 void ice_throw() const override;
260
261 /// The adapter ID.
262 std::string id;
263
264 protected:
265 /// @private
266 void _writeImpl(Ice::OutputStream*) const override;
267
268 /// @private
269 void _readImpl(Ice::InputStream*) override;
270 };
271
272 /// The exception that is thrown when IceGrid does not know a node with the provided name.
273 /// @headerfile IceGrid/IceGrid.h
274 class ICEGRID_API NodeNotExistException : public Ice::UserException
275 {
276 public:
277 /// Default constructor.
278 NodeNotExistException() noexcept = default;
279
280 /// One-shot constructor to initialize all data members.
281 /// @param name The node name.
282 NodeNotExistException(std::string name) noexcept :
283 name(std::move(name))
284 {
285 }
286
287 /// Copy constructor.
289
290 /// Creates a tuple with all the fields of this exception.
291 /// @return A tuple with all the fields of this exception.
292 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
293 {
294 return std::tie(name);
295 }
296
297 void ice_printFields(std::ostream& os) const override;
298 /// Gets the type ID of the associated Slice exception.
299 /// @return The string `"::IceGrid::NodeNotExistException"`.
300 static const char* ice_staticId() noexcept;
301
302 [[nodiscard]] const char* ice_id() const noexcept override;
303
304 void ice_throw() const override;
305
306 /// The node name.
307 std::string name;
308
309 protected:
310 /// @private
311 void _writeImpl(Ice::OutputStream*) const override;
312
313 /// @private
314 void _readImpl(Ice::InputStream*) override;
315 };
316
317 /// The exception that is thrown when IceGrid does not know a registry with the provided name.
318 /// @headerfile IceGrid/IceGrid.h
319 class ICEGRID_API RegistryNotExistException : public Ice::UserException
320 {
321 public:
322 /// Default constructor.
323 RegistryNotExistException() noexcept = default;
324
325 /// One-shot constructor to initialize all data members.
326 /// @param name The registry name.
327 RegistryNotExistException(std::string name) noexcept :
328 name(std::move(name))
329 {
330 }
331
332 /// Copy constructor.
334
335 /// Creates a tuple with all the fields of this exception.
336 /// @return A tuple with all the fields of this exception.
337 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
338 {
339 return std::tie(name);
340 }
341
342 void ice_printFields(std::ostream& os) const override;
343 /// Gets the type ID of the associated Slice exception.
344 /// @return The string `"::IceGrid::RegistryNotExistException"`.
345 static const char* ice_staticId() noexcept;
346
347 [[nodiscard]] const char* ice_id() const noexcept override;
348
349 void ice_throw() const override;
350
351 /// The registry name.
352 std::string name;
353
354 protected:
355 /// @private
356 void _writeImpl(Ice::OutputStream*) const override;
357
358 /// @private
359 void _readImpl(Ice::InputStream*) override;
360 };
361
362 /// The exception that is thrown when the allocation of an object failed.
363 /// @headerfile IceGrid/IceGrid.h
364 class ICEGRID_API AllocationException : public Ice::UserException
365 {
366 public:
367 /// Default constructor.
368 AllocationException() noexcept = default;
369
370 /// One-shot constructor to initialize all data members.
371 /// @param reason The reason why the object couldn't be allocated.
372 AllocationException(std::string reason) noexcept :
373 reason(std::move(reason))
374 {
375 }
376
377 /// Copy constructor.
378 AllocationException(const AllocationException&) noexcept = default;
379
380 /// Creates a tuple with all the fields of this exception.
381 /// @return A tuple with all the fields of this exception.
382 [[nodiscard]] std::tuple<const std::string&> ice_tuple() const
383 {
384 return std::tie(reason);
385 }
386
387 void ice_printFields(std::ostream& os) const override;
388 /// Gets the type ID of the associated Slice exception.
389 /// @return The string `"::IceGrid::AllocationException"`.
390 static const char* ice_staticId() noexcept;
391
392 [[nodiscard]] const char* ice_id() const noexcept override;
393
394 void ice_throw() const override;
395
396 /// The reason why the object couldn't be allocated.
397 std::string reason;
398
399 protected:
400 /// @private
401 void _writeImpl(Ice::OutputStream*) const override;
402
403 /// @private
404 void _readImpl(Ice::InputStream*) override;
405 };
406
407 /// The exception that is thrown when the request to allocate an object times out.
408 /// @headerfile IceGrid/IceGrid.h
410 {
411 public:
413
414 /// Gets the type ID of the associated Slice exception.
415 /// @return The string `"::IceGrid::AllocationTimeoutException"`.
416 static const char* ice_staticId() noexcept;
417
418 [[nodiscard]] const char* ice_id() const noexcept override;
419
420 void ice_throw() const override;
421
422 protected:
423 /// @private
424 void _writeImpl(Ice::OutputStream*) const override;
425
426 /// @private
427 void _readImpl(Ice::InputStream*) override;
428 };
429
430 /// The exception that is thrown when a well-known object is already registered.
431 /// @headerfile IceGrid/IceGrid.h
432 class ICEGRID_API ObjectExistsException : public Ice::UserException
433 {
434 public:
435 /// Default constructor.
436 ObjectExistsException() noexcept = default;
437
438 /// One-shot constructor to initialize all data members.
439 /// @param id The identity of the object.
440 ObjectExistsException(::Ice::Identity id) noexcept :
441 id(std::move(id))
442 {
443 }
444
445 /// Copy constructor.
447
448 /// Creates a tuple with all the fields of this exception.
449 /// @return A tuple with all the fields of this exception.
450 [[nodiscard]] std::tuple<const ::Ice::Identity&> ice_tuple() const
451 {
452 return std::tie(id);
453 }
454
455 void ice_printFields(std::ostream& os) const override;
456 /// Gets the type ID of the associated Slice exception.
457 /// @return The string `"::IceGrid::ObjectExistsException"`.
458 static const char* ice_staticId() noexcept;
459
460 [[nodiscard]] const char* ice_id() const noexcept override;
461
462 void ice_throw() const override;
463
464 /// The identity of the object.
465 ::Ice::Identity id;
466
467 protected:
468 /// @private
469 void _writeImpl(Ice::OutputStream*) const override;
470
471 /// @private
472 void _readImpl(Ice::InputStream*) override;
473 };
474
475 /// The exception that is thrown when a well-known object is not registered.
476 /// @headerfile IceGrid/IceGrid.h
477 class ICEGRID_API ObjectNotRegisteredException : public Ice::UserException
478 {
479 public:
480 /// Default constructor.
481 ObjectNotRegisteredException() noexcept = default;
482
483 /// One-shot constructor to initialize all data members.
484 /// @param id The identity of the object.
485 ObjectNotRegisteredException(::Ice::Identity id) noexcept :
486 id(std::move(id))
487 {
488 }
489
490 /// Copy constructor.
492
493 /// Creates a tuple with all the fields of this exception.
494 /// @return A tuple with all the fields of this exception.
495 [[nodiscard]] std::tuple<const ::Ice::Identity&> ice_tuple() const
496 {
497 return std::tie(id);
498 }
499
500 void ice_printFields(std::ostream& os) const override;
501 /// Gets the type ID of the associated Slice exception.
502 /// @return The string `"::IceGrid::ObjectNotRegisteredException"`.
503 static const char* ice_staticId() noexcept;
504
505 [[nodiscard]] const char* ice_id() const noexcept override;
506
507 void ice_throw() const override;
508
509 /// The identity of the object.
510 ::Ice::Identity id;
511
512 protected:
513 /// @private
514 void _writeImpl(Ice::OutputStream*) const override;
515
516 /// @private
517 void _readImpl(Ice::InputStream*) override;
518 };
519}
520
521// NOLINTEND(modernize-concat-nested-namespaces)
522
523#include <Ice/PopDisableWarnings.h>
524#endif
AdapterNotExistException(const AdapterNotExistException &) noexcept=default
Copy constructor.
void ice_throw() const override
Throws this exception.
AdapterNotExistException() noexcept=default
Default constructor.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:247
const char * ice_id() const noexcept override
Returns the type ID of this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:382
std::string reason
The reason why the object couldn't be allocated.
Definition Exception.h:397
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
AllocationException(const AllocationException &) noexcept=default
Copy constructor.
void ice_throw() const override
Throws this exception.
AllocationException() noexcept=default
Default constructor.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
AllocationException() noexcept=default
Default constructor.
The exception that is thrown when the request to allocate an object times out.
Definition Exception.h:410
void ice_throw() const override
Throws this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::string name
The name of the application.
Definition Exception.h:72
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:57
const char * ice_id() const noexcept override
Returns the type ID of this exception.
ApplicationNotExistException(const ApplicationNotExistException &) noexcept=default
Copy constructor.
ApplicationNotExistException() noexcept=default
Default constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_throw() const override
Throws this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:292
std::string name
The node name.
Definition Exception.h:307
NodeNotExistException() noexcept=default
Default constructor.
NodeNotExistException(const NodeNotExistException &) noexcept=default
Copy constructor.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
std::tuple< const ::Ice::Identity & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:450
const char * ice_id() const noexcept override
Returns the type ID of this exception.
ObjectExistsException(const ObjectExistsException &) noexcept=default
Copy constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
ObjectExistsException() noexcept=default
Default constructor.
void ice_throw() const override
Throws this exception.
ObjectNotRegisteredException() noexcept=default
Default constructor.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
ObjectNotRegisteredException(const ObjectNotRegisteredException &) noexcept=default
Copy constructor.
std::tuple< const ::Ice::Identity & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:495
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_throw() const override
Throws this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_throw() const override
Throws this exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
RegistryNotExistException(const RegistryNotExistException &) noexcept=default
Copy constructor.
std::string name
The registry name.
Definition Exception.h:352
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:337
RegistryNotExistException() noexcept=default
Default constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
void ice_throw() const override
Throws this exception.
ServerNotExistException(const ServerNotExistException &) noexcept=default
Copy constructor.
ServerNotExistException() noexcept=default
Default constructor.
std::tuple< const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:102
void ice_throw() const override
Throws this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
ServerStartException() noexcept=default
Default constructor.
ServerStartException(const ServerStartException &) noexcept=default
Copy constructor.
std::string reason
The reason for the failure.
Definition Exception.h:167
std::tuple< const std::string &, const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:149
ServerStopException() noexcept=default
Default constructor.
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice exception.
std::tuple< const std::string &, const std::string & > ice_tuple() const
Creates a tuple with all the fields of this exception.
Definition Exception.h:199
void ice_throw() const override
Throws this exception.
const char * ice_id() const noexcept override
Returns the type ID of this exception.
std::string reason
The reason for the failure.
Definition Exception.h:217
ServerStopException(const ServerStopException &) noexcept=default
Copy constructor.
void ice_printFields(std::ostream &os) const override
Outputs the name and value of each field of this instance, including inherited fields,...
Abstract base class for all Ice exceptions defined in Slice.
Deploy and manage Ice servers.
Definition Admin.h:34
The Ice RPC framework.
Definition SampleEvent.h:59