61 Error(Error&&) noexcept = default;
62 Error& operator=(Error&&) noexcept = default;
63 Error(const Error&) = default;
64 Error& operator=(const Error&) = default;
67 [[nodiscard]]
const std::string&
message()
const {
return message_; }
70 std::string
message =
"An unexpected error occurred")
76 std::string
message =
"Requested resource could not be found")
82 std::string
message =
"Requested resource did not contain any XMP data (at all)")
88 std::string
message =
"Requested resource did not contain the desired XMP key")
94 std::string
message =
"Requested XML could not be read")
100 std::string
message =
"Requested XML could not be read")
106 std::string
message =
"Requested file does not support any supported binding mechanism")
115 template <
typename T>
static Error xmp_key_not_found(std::string message="Requested resource did not contain the desired XMP key")
Definition expected.h:87
Error(Error &&) noexcept=default
ExitCode code() const
Definition expected.h:66
static Error xml_could_not_create_xpath_context(std::string message="Requested XML could not be read")
Definition expected.h:99
static Error xmp_not_found(std::string message="Requested resource did not contain any XMP data (at all)")
Definition expected.h:81
static Error unexpected(std::string message="An unexpected error occurred")
Definition expected.h:69
const std::string & message() const
Definition expected.h:67
static Error file_not_found(std::string message="Requested resource could not be found")
Definition expected.h:75
static Error xml_could_not_parse(std::string message="Requested XML could not be read")
Definition expected.h:93
static Error no_binding_support(std::string message="Requested file does not support any supported binding mechanism")
Definition expected.h:105
Basic enum containing a list of integer exit codes which the application may use.
Lightweight helpers for generating NATO confidentiality metadata.
Definition binding.h:32
std::expected< T, Error > Expected
Convenience typedef to standardise usage of nmbs::error in all std::expected usages.
Definition expected.h:116
ExitCode
Definition exit_code.h:33
@ xml_could_not_parse
The XML parser was unable to read the provided XML.
Definition exit_code.h:57
@ file_not_found
The specified file could not be found.
Definition exit_code.h:45
@ unknown_error
An unspecified error occurred.
Definition exit_code.h:73
@ xml_could_not_create_xpath_context
The XML parser was unable to read create an XPath context.
Definition exit_code.h:61
@ xmp_not_found
There was no XMP packet attached to a file.
Definition exit_code.h:49
@ no_binding_support
There was no binding profile available for the selected file.
Definition exit_code.h:69
@ xmp_key_not_found
Although the file contained XMP, the desired key was not found.
Definition exit_code.h:53