Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::ForeignException Class Reference

#include <error.hh>

Inheritance diagram for nix::ForeignException:
nix::BaseException

Public Member Functions

 ForeignException (const std::exception &inner)
void rethrow () const
template<typename E>
E * as () const
template<typename E>
bool is () const
const char * what () const noexcept override
Public Member Functions inherited from nix::BaseException
std::shared_ptr< const std::list< AsyncTraceFrame > > asyncTrace () const
void addAsyncTrace (std::source_location loc, std::optional< std::string > description=std::nullopt)

Public Attributes

const std::exception_ptr inner
const std::type_info & innerType

Detailed Description

Wrap any exception as BaseException. We don't wrap as Error because we do not usually want to catch these exceptions and we don't use std::nested_exception because we need the dynamic type to preserve the original exception for that. This should never be used to wrap something that already is a BaseError (or a BaseException), but this isn't checked since this should not be thrown often.


The documentation for this class was generated from the following file: