All Classes Namespaces Functions Variables Typedefs Enumerations Friends
exception.h
1 
5 #pragma once
6 
7 #include <exception>
8 #include <string>
9 
10 namespace ucxx {
11 
17 class Error : public std::exception {
18  private:
19  std::string _msg{};
20 
21  public:
29  explicit Error(const std::string& msg) : _msg{msg} {}
30 
38  const char* what() const noexcept override { return this->_msg.c_str(); }
39 };
40 
46 class NoMessageError : public Error {
47  public:
55  explicit NoMessageError(const std::string& msg) : Error(msg) {}
56 };
57 
63 class NoResourceError : public Error {
64  public:
72  explicit NoResourceError(const std::string& msg) : Error(msg) {}
73 };
74 
80 class IOError : public Error {
81  public:
89  explicit IOError(const std::string& msg) : Error(msg) {}
90 };
91 
97 class NoMemoryError : public Error {
98  public:
106  explicit NoMemoryError(const std::string& msg) : Error(msg) {}
107 };
108 
114 class InvalidParamError : public Error {
115  public:
123  explicit InvalidParamError(const std::string& msg) : Error(msg) {}
124 };
125 
131 class UnreachableError : public Error {
132  public:
140  explicit UnreachableError(const std::string& msg) : Error(msg) {}
141 };
142 
148 class InvalidAddrError : public Error {
149  public:
157  explicit InvalidAddrError(const std::string& msg) : Error(msg) {}
158 };
159 
165 class NotImplementedError : public Error {
166  public:
174  explicit NotImplementedError(const std::string& msg) : Error(msg) {}
175 };
176 
182 class MessageTruncatedError : public Error {
183  public:
191  explicit MessageTruncatedError(const std::string& msg) : Error(msg) {}
192 };
193 
199 class NoProgressError : public Error {
200  public:
208  explicit NoProgressError(const std::string& msg) : Error(msg) {}
209 };
210 
216 class BufferTooSmallError : public Error {
217  public:
225  explicit BufferTooSmallError(const std::string& msg) : Error(msg) {}
226 };
227 
233 class NoElemError : public Error {
234  public:
242  explicit NoElemError(const std::string& msg) : Error(msg) {}
243 };
244 
251  public:
259  explicit SomeConnectsFailedError(const std::string& msg) : Error(msg) {}
260 };
261 
267 class NoDeviceError : public Error {
268  public:
276  explicit NoDeviceError(const std::string& msg) : Error(msg) {}
277 };
278 
284 class BusyError : public Error {
285  public:
293  explicit BusyError(const std::string& msg) : Error(msg) {}
294 };
295 
301 class CanceledError : public Error {
302  public:
310  explicit CanceledError(const std::string& msg) : Error(msg) {}
311 };
312 
318 class ShmemSegmentError : public Error {
319  public:
327  explicit ShmemSegmentError(const std::string& msg) : Error(msg) {}
328 };
329 
335 class AlreadyExistsError : public Error {
336  public:
344  explicit AlreadyExistsError(const std::string& msg) : Error(msg) {}
345 };
346 
352 class OutOfRangeError : public Error {
353  public:
361  explicit OutOfRangeError(const std::string& msg) : Error(msg) {}
362 };
363 
369 class TimedOutError : public Error {
370  public:
378  explicit TimedOutError(const std::string& msg) : Error(msg) {}
379 };
380 
386 class ExceedsLimitError : public Error {
387  public:
395  explicit ExceedsLimitError(const std::string& msg) : Error(msg) {}
396 };
397 
403 class UnsupportedError : public Error {
404  public:
412  explicit UnsupportedError(const std::string& msg) : Error(msg) {}
413 };
414 
420 class RejectedError : public Error {
421  public:
429  explicit RejectedError(const std::string& msg) : Error(msg) {}
430 };
431 
437 class NotConnectedError : public Error {
438  public:
446  explicit NotConnectedError(const std::string& msg) : Error(msg) {}
447 };
448 
454 class ConnectionResetError : public Error {
455  public:
463  explicit ConnectionResetError(const std::string& msg) : Error(msg) {}
464 };
465 
471 class FirstLinkFailureError : public Error {
472  public:
480  explicit FirstLinkFailureError(const std::string& msg) : Error(msg) {}
481 };
482 
488 class LastLinkFailureError : public Error {
489  public:
497  explicit LastLinkFailureError(const std::string& msg) : Error(msg) {}
498 };
499 
506  public:
514  explicit FirstEndpointFailureError(const std::string& msg) : Error(msg) {}
515 };
516 
522 class EndpointTimeoutError : public Error {
523  public:
531  explicit EndpointTimeoutError(const std::string& msg) : Error(msg) {}
532 };
533 
540  public:
548  explicit LastEndpointFailureError(const std::string& msg) : Error(msg) {}
549 };
550 
551 } // namespace ucxx
The exception for UCS_ERR_ALREADY_EXISTS.
Definition: exception.h:335
AlreadyExistsError(const std::string &msg)
The UCS_ERR_ALREADY_EXISTS constructor.
Definition: exception.h:344
The exception for UCS_ERR_BUFFER_TOO_SMALL.
Definition: exception.h:216
BufferTooSmallError(const std::string &msg)
The UCS_ERR_BUFFER_TOO_SMALL constructor.
Definition: exception.h:225
The exception for UCS_ERR_BUSY.
Definition: exception.h:284
BusyError(const std::string &msg)
The UCS_ERR_BUSY constructor.
Definition: exception.h:293
The exception for UCS_ERR_CANCELED.
Definition: exception.h:301
CanceledError(const std::string &msg)
The UCS_ERR_CANCELED constructor.
Definition: exception.h:310
The exception for UCS_ERR_CONNECTION_RESET.
Definition: exception.h:454
ConnectionResetError(const std::string &msg)
The UCS_ERR_CONNECTION_RESET constructor.
Definition: exception.h:463
The exception for UCS_ERR_ENDPOINT_TIMEOUT.
Definition: exception.h:522
EndpointTimeoutError(const std::string &msg)
The UCS_ERR_ENDPOINT_TIMEOUT constructor.
Definition: exception.h:531
The base class for all UCX exceptions.
Definition: exception.h:17
const char * what() const noexcept override
Returns an explanatory string.
Definition: exception.h:38
Error(const std::string &msg)
The base class constructor.
Definition: exception.h:29
The exception for UCS_ERR_EXCEEDS_LIMIT.
Definition: exception.h:386
ExceedsLimitError(const std::string &msg)
The UCS_ERR_EXCEEDS_LIMIT constructor.
Definition: exception.h:395
The exception for UCS_ERR_FIRST_ENDPOINT_FAILURE.
Definition: exception.h:505
FirstEndpointFailureError(const std::string &msg)
The UCS_ERR_FIRST_ENDPOINT_FAILURE constructor.
Definition: exception.h:514
The exception for UCS_ERR_FIRST_LINK_FAILURE.
Definition: exception.h:471
FirstLinkFailureError(const std::string &msg)
The UCS_ERR_FIRST_LINK_FAILURE constructor.
Definition: exception.h:480
The exception for UCS_ERR_IO_ERROR.
Definition: exception.h:80
IOError(const std::string &msg)
The UCS_ERR_IO_ERROR constructor.
Definition: exception.h:89
The exception for UCS_ERR_INVALID_ADDR.
Definition: exception.h:148
InvalidAddrError(const std::string &msg)
The UCS_ERR_INVALID_ADDR constructor.
Definition: exception.h:157
The exception for UCS_ERR_INVALID_PARAM.
Definition: exception.h:114
InvalidParamError(const std::string &msg)
The UCS_ERR_INVALID_PARAM constructor.
Definition: exception.h:123
The exception for UCS_ERR_LAST_ENDPOINT_FAILURE.
Definition: exception.h:539
LastEndpointFailureError(const std::string &msg)
The UCS_ERR_LAST_ENDPOINT_FAILURE constructor.
Definition: exception.h:548
The exception for UCS_ERR_LAST_LINK_FAILURE.
Definition: exception.h:488
LastLinkFailureError(const std::string &msg)
The UCS_ERR_LAST_LINK_FAILURE constructor.
Definition: exception.h:497
The exception for UCS_ERR_MESSAGE_TRUNCATED.
Definition: exception.h:182
MessageTruncatedError(const std::string &msg)
The UCS_ERR_MESSAGE_TRUNCATED constructor.
Definition: exception.h:191
The exception for UCS_ERR_NO_DEVICE.
Definition: exception.h:267
NoDeviceError(const std::string &msg)
The UCS_ERR_NO_DEVICE constructor.
Definition: exception.h:276
The exception for UCS_ERR_NO_ELEM.
Definition: exception.h:233
NoElemError(const std::string &msg)
The UCS_ERR_NO_ELEM constructor.
Definition: exception.h:242
The exception for UCS_ERR_NO_MEMORY.
Definition: exception.h:97
NoMemoryError(const std::string &msg)
The UCS_ERR_NO_MEMORY constructor.
Definition: exception.h:106
The exception for UCS_ERR_NO_MESSAGE.
Definition: exception.h:46
NoMessageError(const std::string &msg)
The UCS_ERR_NO_MESSAGE constructor.
Definition: exception.h:55
The exception for UCS_ERR_NO_PROGRESS.
Definition: exception.h:199
NoProgressError(const std::string &msg)
The UCS_ERR_NO_PROGRESS constructor.
Definition: exception.h:208
The exception for UCS_ERR_NO_RESOURCE.
Definition: exception.h:63
NoResourceError(const std::string &msg)
The UCS_ERR_NO_RESOURCE constructor.
Definition: exception.h:72
The exception for UCS_ERR_NOT_CONNECTED.
Definition: exception.h:437
NotConnectedError(const std::string &msg)
The UCS_ERR_NOT_CONNECTED constructor.
Definition: exception.h:446
The exception for UCS_ERR_NOT_IMPLEMENTED.
Definition: exception.h:165
NotImplementedError(const std::string &msg)
The UCS_ERR_NOT_IMPLEMENTED constructor.
Definition: exception.h:174
The exception for UCS_ERR_OUT_OF_RANGE.
Definition: exception.h:352
OutOfRangeError(const std::string &msg)
The UCS_ERR_OUT_OF_RANGE constructor.
Definition: exception.h:361
The exception for UCS_ERR_REJECTED.
Definition: exception.h:420
RejectedError(const std::string &msg)
The UCS_ERR_REJECTED constructor.
Definition: exception.h:429
The exception for UCS_ERR_SHMEM_SEGMENT.
Definition: exception.h:318
ShmemSegmentError(const std::string &msg)
The UCS_ERR_SHMEM_SEGMENT constructor.
Definition: exception.h:327
The exception for UCS_ERR_SOME_CONNECTS_FAILED.
Definition: exception.h:250
SomeConnectsFailedError(const std::string &msg)
The UCS_ERR_SOME_CONNECTS_FAILED constructor.
Definition: exception.h:259
The exception for UCS_ERR_TIMED_OUT.
Definition: exception.h:369
TimedOutError(const std::string &msg)
The UCS_ERR_TIMED_OUT constructor.
Definition: exception.h:378
The exception for UCS_ERR_UNREACHABLE.
Definition: exception.h:131
UnreachableError(const std::string &msg)
The UCS_ERR_UNREACHABLE constructor.
Definition: exception.h:140
The exception for UCS_ERR_UNSUPPORTED.
Definition: exception.h:403
UnsupportedError(const std::string &msg)
The UCS_ERR_UNSUPPORTED constructor.
Definition: exception.h:412
Definition: address.h:15