|
libnmbs 1.0.0
|
A simple error container to use with nmbs::expected for communicating domain issues to function callers. More...
#include <nmbs/expected.h>
Public Member Functions | |
| Error ()=delete | |
| Error (Error &&) noexcept=default | |
| Error & | operator= (Error &&) noexcept=default |
| Error (const Error &)=default | |
| Error & | operator= (const Error &)=default |
| ExitCode | code () const |
| const std::string & | message () const |
Static Public Member Functions | |
| static Error | unexpected (std::string message="An unexpected error occurred") |
| static Error | file_not_found (std::string message="Requested resource could not be found") |
| static Error | xmp_not_found (std::string message="Requested resource did not contain any XMP data (at all)") |
| static Error | xmp_key_not_found (std::string message="Requested resource did not contain the desired XMP key") |
| static Error | xml_could_not_parse (std::string message="Requested XML could not be read") |
| static Error | xml_could_not_create_xpath_context (std::string message="Requested XML could not be read") |
| static Error | no_binding_support (std::string message="Requested file does not support any supported binding mechanism") |
A simple error container to use with nmbs::expected for communicating domain issues to function callers.
Intended to be small and lightweight. A nmbs::exit_code is provided to better enable logic to be built on top of specific errors. Static factory functions are provided to support in generating errors. e.g.
The constructors are private, and the produced instances are immutable with only const accessors being provided. Copy constructors, including move support are provided.
|
delete |
|
defaultnoexcept |
|
default |
|
inlinenodiscard |
|
inlinestatic |
|
inlinenodiscard |
|
inlinestatic |
|
default |
|
defaultnoexcept |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |