KDevelop API Documentation

ANTLRException Class Reference

#include <ANTLRException.hpp>

Inheritance diagram for ANTLRException:

Inheritance graph
[legend]
Collaboration diagram for ANTLRException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ANTLRException ()
 Create ANTLR base exception without error message.
 ANTLRException (const std::string &s)
 Create ANTLR base exception with error message.
virtual ~ANTLRException () throw ()
virtual std::string toString () const
 Return complete error message with line/column number info (if present).
virtual std::string getMessage () const
 Return error message without additional info (if present).

Private Attributes

std::string text

Constructor & Destructor Documentation

ANTLRException::ANTLRException  )  [inline]
 

Create ANTLR base exception without error message.

Definition at line 22 of file ANTLRException.hpp.

References text.

ANTLRException::ANTLRException const std::string &  s  )  [inline]
 

Create ANTLR base exception with error message.

Definition at line 26 of file ANTLRException.hpp.

References text.

virtual ANTLRException::~ANTLRException  )  throw () [inline, virtual]
 

Definition at line 30 of file ANTLRException.hpp.


Member Function Documentation

virtual std ::string ANTLRException::getMessage  )  const [inline, virtual]
 

Return error message without additional info (if present).

Note:
when making your own exceptions classes override toString and call in toString getMessage which relays the text attribute from here.

Reimplemented in MismatchedCharException, MismatchedTokenException, NoViableAltException, and NoViableAltForCharException.

Definition at line 48 of file ANTLRException.hpp.

Referenced by MismatchedTokenException::getMessage(), MismatchedCharException::getMessage(), and TokenStreamRecognitionException::toString().

virtual std ::string ANTLRException::toString  )  const [inline, virtual]
 

Return complete error message with line/column number info (if present).

Note:
for your own exceptions override this one. Call getMessage from here to get the 'clean' error message stored in the text attribute.

Reimplemented in RecognitionException, and TokenStreamRecognitionException.

Definition at line 38 of file ANTLRException.hpp.


Member Data Documentation

std ::string ANTLRException::text [private]
 

Definition at line 53 of file ANTLRException.hpp.

Referenced by ANTLRException().


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:18:52 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003