| libcosmos
    Linux C++ System Programming Library | 
Specialized exception type for out of range errors reported by the OS. More...
#include <RangeError.hxx>
 Inheritance diagram for cosmos::RangeError:
 Inheritance diagram for cosmos::RangeError:| Public Member Functions | |
| RangeError (const std::string_view operation, const size_t required_length=0) | |
| auto | requiredLength () const | 
| bool | requiredLengthKnown () const | 
|  Public Member Functions inherited from cosmos::ApiError | |
| ApiError (const std::string_view prefix) | |
| Stores the current errno code in the exception. | |
| ApiError (const std::string_view prefix, const Errno err) | |
| Stores the given errno code in the exception. | |
| std::string | msg () const | 
| Returns the plain operating system error message. | |
| auto | errnum () const | 
| Returns the plain errno stored in the exception. | |
|  Public Member Functions inherited from cosmos::CosmosError | |
| CosmosError (const std::string_view error_class, const std::string_view fixed_text={}) | |
| CosmosError & | setInfo (const char *file, const size_t line, const char *func) | 
| Set exception context information. | |
| const char * | what () const override throw () | 
| Implementation of the std::exception interface. | |
| std::string | shortWhat () const | 
| Returns a shorter description of the error without verbose context. | |
| virtual void | raise ()=0 | 
| Throw the most specialized type of this object in the inheritance hierarchy. | |
| Protected Attributes | |
| const size_t | m_required_length = 0 | 
|  Protected Attributes inherited from cosmos::ApiError | |
| Errno | m_errno = Errno::NO_ERROR | 
|  Protected Attributes inherited from cosmos::CosmosError | |
| std::string_view | m_error_class | 
| Descriptive, unique error class label. | |
| std::string | m_msg | 
| Runtime generated error message. | |
| bool | m_msg_generated = false | 
| Whether m_msg has been assembled yet. | |
| const char * | m_file = nullptr | 
| const char * | m_func = nullptr | 
| size_t | m_line = 0 | 
| Additional Inherited Members | |
|  Static Public Member Functions inherited from cosmos::ApiError | |
| static std::string | msg (const Errno err) | 
| Returns a human readable error message for the given errno code. | |
|  Public Attributes inherited from cosmos::ApiError | |
| COSMOS_ERROR_IMPL | |
|  Protected Member Functions inherited from cosmos::ApiError | |
| void | generateMsg () const override | 
| Append type specific error information to m_msg. | |
|  Protected Member Functions inherited from cosmos::CosmosError | |
| void | setErrorClass (const std::string_view error_class) | 
| Allows to override error class to allow simpler implementation of derived types. | |
Specialized exception type for out of range errors reported by the OS.
This is a dedicated error type, because it can carry a hint about the supported range returned from a system or libc call.
Definition at line 13 of file RangeError.hxx.
| 
 | inlineexplicit | 
Definition at line 17 of file RangeError.hxx.
| 
 | inline | 
Definition at line 23 of file RangeError.hxx.
| 
 | inline | 
Definition at line 27 of file RangeError.hxx.
| 
 | protected | 
Definition at line 33 of file RangeError.hxx.