Exception to indicate file I/O errors, such as failure to open or write to a file.
More...
#include <lomiri/LomiriExceptions.h>
|
| FileException (std::string const &reason, int err) |
| Constructs the exception.
|
|
virtual std::exception_ptr | self () const override |
| Returns a std::exception_ptr to this .
|
|
int | error () const noexcept |
|
char const * | what () const noexcept override |
| Returns a string describing the exception, including any exceptions that were nested or chained.
|
|
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.
|
|
|
| Exception (std::string const &name, std::string const &reason) |
| Constructs an exception instance.
|
|
Exception to indicate file I/O errors, such as failure to open or write to a file.
◆ FileException()
lomiri::FileException::FileException |
( |
std::string const & |
reason, |
|
|
int |
err |
|
) |
| |
|
default |
Constructs the exception.
Constructs the exception from a reason string and and error number.
- Parameters
-
reason | Further details about the cause of the exception. |
err | The UNIX errno value for the error. |
◆ error()
int lomiri::FileException::error |
( |
| ) |
const |
|
noexcept |
- Returns
- Returns the error number that was passed to the constructor.
◆ self()
exception_ptr lomiri::FileException::self |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: