abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
IoError Class Reference

Input-Output error. More...

#include <lemon/error.h>

Inheritance diagram for IoError:

Public Member Functions

 IoError (const IoError &error) noexcept
 Copy constructor.
 IoError (const char *message) noexcept
 Constructor.
 IoError (const std::string &message) noexcept
 Constructor.
 IoError (const char *message, const std::string &file) noexcept
 Constructor.
 IoError (const std::string &message, const std::string &file) noexcept
 Constructor.
virtual ~IoError () noexcept
 Virtual destructor.
void message (const char *message) noexcept
 Set the error message.
void message (const std::string &message) noexcept
 Set the error message.
void file (const std::string &file) noexcept
 Set the file name.
const std::string & message () const noexcept
 Returns the error message.
const std::string & file () const noexcept
 Returns the filename.
virtual const char * what () const noexcept
 Returns a short error message.
Public Member Functions inherited from Exception
 Exception () noexcept
 Constructor.
virtual ~Exception ()=default
 Virtual destructor.
 Exception (const Exception &)=default
 Copy constructor.
Exception & operator= (const Exception &)=default
 Copy assignment.

Detailed Description

This exception is thrown when a file operation cannot be succeeded.

Member Function Documentation

◆ file()

const std::string & file ( ) const
inlinenoexcept

Returns the filename or an empty string if it was not specified.

◆ what()

virtual const char * what ( ) const
inlinevirtualnoexcept

Returns a short error message which contains the message and the file name.

Reimplemented from Exception.