#include <error.hh>
|
|
| BaseError (const BaseError &)=default |
|
BaseError & | operator= (BaseError const &rhs)=default |
|
template<typename... Args> |
| | BaseError (unsigned int status, const Args &... args) |
|
template<typename... Args> |
| | BaseError (const std::string &fs, const Args &... args) |
|
template<typename... Args> |
| | BaseError (const Suggestions &sug, const Args &... args) |
|
| BaseError (HintFmt hint) |
|
| BaseError (ErrorInfo &&e) |
|
| BaseError (const ErrorInfo &e) |
|
const char * | what () const noexcept override |
|
const std::string & | msg () const |
|
const ErrorInfo & | info () const |
|
void | withExitStatus (unsigned int status) |
|
void | atPos (std::shared_ptr< Pos > pos) |
|
void | pushTrace (Trace trace) |
|
template<typename... Args> |
| void | addTrace (std::shared_ptr< Pos > &&e, std::string_view fs, const Args &... args) |
|
void | addTrace (std::shared_ptr< Pos > &&e, HintFmt hint) |
|
bool | hasTrace () const |
|
const ErrorInfo & | info () |
|
std::shared_ptr< const std::list< AsyncTraceFrame > > | asyncTrace () const |
|
void | addAsyncTrace (std::source_location loc, std::optional< std::string > description=std::nullopt) |
BaseError should generally not be caught, as it has Interrupted as a subclass. Catch Error instead.
◆ calcWhat()
| const std::string & nix::BaseError::calcWhat |
( |
| ) |
const |
|
protected |
Format err.msg and set what_ to the resulting value.
◆ what_
| std::optional<std::string> nix::BaseError::what_ |
|
mutableprotected |
Cached formatted contents of err.msg.
The documentation for this class was generated from the following files:
- lix/libutil/error.hh
- lix/libutil/error.cc