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