My Project
Loading...
Searching...
No Matches
lomiri::ResourceException Class Reference

Exception for miscellaneous errors, such as failure of a third-party library or hitting resource limitations. More...

#include <lomiri/LomiriExceptions.h>

Inheritance diagram for lomiri::ResourceException:
Collaboration diagram for lomiri::ResourceException:

Public Member Functions

 ResourceException (std::string const &reason)
 Constructs the exception.
 
virtual std::exception_ptr self () const override
 Returns a std::exception_ptr to this.
 
- Public Member Functions inherited from lomiri::Exception
char const * what () const noexcept override
 Returns a string describing the exception, including any exceptions that were nested or chained.
 
virtual std::exception_ptr self () const =0
 Returns a std::exception_ptr to this.
 
std::string name () const
 Returns the name set by the derived class's constructor.
 
std::string reason () const
 Returns the reason set by the derived class's constructor (empty string if none).
 
std::string to_string (std::string const &indent=" ") const
 Returns a string describing the exception, including any exceptions that were nested or chained.
 
std::string to_string (int indent_level, std::string const &indent) const
 Returns a string describing the exception, including any exceptions that were nested or chained.
 
std::exception_ptr remember (std::exception_ptr earlier_exception)
 Adds an exception to the exception history chain.
 
std::exception_ptr get_earlier () const noexcept
 Returns the previous exception.
 

Additional Inherited Members

- Protected Member Functions inherited from lomiri::Exception
 Exception (std::string const &name, std::string const &reason)
 Constructs an exception instance.
 

Detailed Description

Exception for miscellaneous errors, such as failure of a third-party library or hitting resource limitations.

Constructor & Destructor Documentation

◆ ResourceException()

lomiri::ResourceException::ResourceException ( std::string const &  reason)
explicitdefault

Constructs the exception.

Parameters
reasonFurther details about the cause of the exception.

Member Function Documentation

◆ self()

exception_ptr lomiri::ResourceException::self ( ) const
overridevirtual

Returns a std::exception_ptr to this.

Implements lomiri::Exception.


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