Flox Package Database 1
CRUD Operations on Nix Package Metadata
|
#include <exceptions.hh>
Public Member Functions | |
FloxException (std::string_view contextMsg) | |
Create a generic exception with a custom message. | |
FloxException (std::string_view contextMsg, std::string_view caughtMsg) | |
Create a generic exception with a custom message and information from a child error. | |
FloxException (std::string_view categoryMsg, std::optional< std::string > contextMsg, std::optional< std::string > caughtMsg) | |
Directly initialize a FloxException with a custom category message, (optional) context, and (optional) information from a child error. | |
virtual error_category | getErrorCode () const noexcept |
std::optional< std::string > | getContextMessage () const noexcept |
std::optional< std::string > | getCaughtMessage () const noexcept |
virtual std::string_view | getCategoryMessage () const noexcept |
const char * | what () const noexcept override |
Produces an explanatory string about an exception. | |
Private Attributes | |
std::optional< std::string > | contextMsg |
std::optional< std::string > | caughtMsg |
std::string | whatMsg |
Typed exception wrapper used for misc errors.
|
inlineexplicit |
Create a generic exception with a custom message.
This constructor is NOT suitable for use by child classes.
|
inlineexplicit |
Create a generic exception with a custom message and information from a child error.
This constructor is NOT suitable for use by child classes.
|
inlineexplicit |
Directly initialize a FloxException with a custom category message, (optional) context, and (optional) information from a child error.
This form is recommended for use by child classes which extend flox::FloxException.
|
private |
If some other exception was caught before throwing this one, caughtMsg contains what() of that exception.
|
private |
Additional context added when the error is thrown.
|
private |
The final what() message.