FormatError

Declared in lemon/error.h, in the group Exceptions; the same class on the Doxygen site.

class FormatError : public Exception

Format error.

This exception is thrown when an input file has wrong format or a data representation is not legal.

Public Functions

inline FormatError( const FormatError & error ) noexcept

Copy constructor.

inline explicit FormatError( const char * message ) noexcept

Constructor.

inline explicit FormatError( const std::string & message ) noexcept

Constructor.

inline explicit FormatError(
const char * message,
const std::string & file,
int line = 0
) noexcept

Constructor.

inline explicit FormatError(
const std::string & message,
const std::string & file,
int line = 0
) noexcept

Constructor.

inline virtual ~FormatError() noexcept

Virtual destructor.

inline void line( int line ) noexcept

Set the line number.

inline void message( const char * message ) noexcept

Set the error message.

inline void message( const std::string & message ) noexcept

Set the error message.

inline void file( const std::string & file ) noexcept

Set the file name.

inline int line() const noexcept

Returns the line number.

Returns the line number or zero if it was not specified.

inline const std::string & message() const noexcept

Returns the error message.

inline const std::string & file() const noexcept

Returns the filename.

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

inline virtual const char * what() const noexcept

Returns a short error message.

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

Protected Attributes

std::string _message
std::string _file
int _line
mutable std::string _what