antlr::ANTLRException Class Reference

#include <ANTLRException.hpp>

Inheritance diagram for antlr::ANTLRException:
[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
virtual std::string getMessage () const

Private Attributes

std::string text

Constructor & Destructor Documentation

antlr::ANTLRException::ANTLRException (  )  [inline]

Create ANTLR base exception without error message.

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

Create ANTLR base exception with error message.

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

Member Function Documentation

virtual std ::string antlr::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 antlr::MismatchedCharException, antlr::MismatchedTokenException, antlr::NoViableAltException, and antlr::NoViableAltForCharException.

virtual std ::string antlr::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 antlr::RecognitionException, and antlr::TokenStreamRecognitionException.


Member Data Documentation

std ::string antlr::ANTLRException::text [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
Generated by  doxygen 1.6.2-20100208