All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
FormatError Class Reference

Detailed Description

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

#include <lemon/error.h>

+ Inheritance diagram for FormatError:

Public Member Functions

 FormatError (const FormatError &error) throw ()
 Copy constructor.
 
 FormatError (const char *message) throw ()
 Constructor.
 
 FormatError (const std::string &message) throw ()
 Constructor.
 
 FormatError (const char *message, const std::string &file, int line=0) throw ()
 Constructor.
 
 FormatError (const std::string &message, const std::string &file, int line=0) throw ()
 Constructor.
 
virtual ~FormatError () throw ()
 Virtual destructor.
 
void line (int line) throw ()
 Set the line number.
 
void message (const char *message) throw ()
 Set the error message.
 
void message (const std::string &message) throw ()
 Set the error message.
 
void file (const std::string &file) throw ()
 Set the file name.
 
int line () const throw ()
 Returns the line number. More...
 
const std::string & message () const throw ()
 Returns the error message.
 
const std::string & file () const throw ()
 Returns the filename. More...
 
virtual const char * what () const throw ()
 Returns a short error message. More...
 
- Public Member Functions inherited from Exception
 Exception () throw ()
 Constructor.
 
virtual ~Exception () throw ()
 Virtual destructor.
 

Member Function Documentation

int line ( ) const
throw (
)
inline

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

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

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

virtual const char* what ( ) const
throw (
)
inlinevirtual

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

Reimplemented from Exception.