ANTLR Support Libraries 2.7.1+
Public Member Functions | Private Attributes | List of all members
antlr::ANTLRException Class Reference

#include <ANTLRException.hpp>

Public Member Functions

 ANTLRException ()
 Create ANTLR base exception without error message. More...
 
 ANTLRException (const std ::string &s)
 Create ANTLR base exception with error message. More...
 
virtual ~ANTLRException () throw ()
 
virtual std ::string toString () const
 
virtual std ::string getMessage () const
 

Private Attributes

std ::string text
 

Constructor & Destructor Documentation

◆ ANTLRException() [1/2]

antlr::ANTLRException::ANTLRException ( )
inline

Create ANTLR base exception without error message.

◆ ANTLRException() [2/2]

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

Create ANTLR base exception with error message.

◆ ~ANTLRException()

virtual antlr::ANTLRException::~ANTLRException ( )
throw (
)
inlinevirtual

Member Function Documentation

◆ getMessage()

virtual std ::string antlr::ANTLRException::getMessage ( ) const
inlinevirtual

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.

◆ toString()

virtual std ::string antlr::ANTLRException::toString ( ) const
inlinevirtual

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.

Member Data Documentation

◆ text

std ::string antlr::ANTLRException::text
private

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