lbm_reference
Public Member Functions | Private Attributes | List of all members
confparser::BadSyntax Class Reference

Exception class for syntax errors. More...

#include <confparser/ConfParser.h>

+ Inheritance diagram for confparser::BadSyntax:
+ Collaboration diagram for confparser::BadSyntax:

Public Member Functions

 BadSyntax () throw ()
 Default constructor. More...
 
 BadSyntax (const std::string file, const int line, const std::string error) throw ()
 Constructor. More...
 
const char * getErrorMsg () const throw ()
 Returns error description. More...
 
const char * getFileName () const throw ()
 Returns the file name. More...
 
int getLine () const throw ()
 Returns the line of the error. More...
 
virtual ~BadSyntax () throw ()
 Destructor. More...
 

Private Attributes

const std::string error_
 Description of the syntax error. More...
 
const std::string file_
 File with erroneous syntax. More...
 
const int line_
 Line of the syntax error. More...
 

Detailed Description

Exception class for syntax errors.

Is capable of providing information about the file and the line where the syntax error occured as well as a description of the error.

Definition at line 25 of file ConfParser.h.

Constructor & Destructor Documentation

confparser::BadSyntax::BadSyntax ( ) throw ()
inline

Default constructor.

Sets no specific information.

Definition at line 37 of file ConfParser.h.

confparser::BadSyntax::BadSyntax ( const std::string  file,
const int  line,
const std::string  error 
) throw ()
inline

Constructor.

Sets information about file and line of error occurrence as well as an error description.

Definition at line 48 of file ConfParser.h.

virtual confparser::BadSyntax::~BadSyntax ( ) throw ()
inlinevirtual

Destructor.

Definition at line 57 of file ConfParser.h.

Member Function Documentation

const char* confparser::BadSyntax::getErrorMsg ( ) const throw ()
inline

Returns error description.

Returns
Description of the error

Definition at line 79 of file ConfParser.h.

References error_.

const char* confparser::BadSyntax::getFileName ( ) const throw ()
inline

Returns the file name.

Returns
Name of the file the syntax error occurred

Definition at line 67 of file ConfParser.h.

References file_.

int confparser::BadSyntax::getLine ( ) const throw ()
inline

Returns the line of the error.

Returns
Line where the syntax error occurred

Definition at line 73 of file ConfParser.h.

References line_.

Member Data Documentation

const std::string confparser::BadSyntax::error_
private

Description of the syntax error.

Definition at line 97 of file ConfParser.h.

Referenced by getErrorMsg().

const std::string confparser::BadSyntax::file_
private

File with erroneous syntax.

Definition at line 89 of file ConfParser.h.

Referenced by getFileName().

const int confparser::BadSyntax::line_
private

Line of the syntax error.

Definition at line 93 of file ConfParser.h.

Referenced by getLine().


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