ANTLR Support Libraries 2.7.1+
 
Loading...
Searching...
No Matches
antlr::ANTLRException Class Reference

#include <ANTLRException.hpp>

Public Member Functions

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

Private Member Functions

 ANTLR_USE_NAMESPACE (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 ANTLR_USE_NAMESPACE(std) string & s)
inline

Create ANTLR base exception with error message.

◆ ~ANTLRException()

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

Member Function Documentation

◆ ANTLR_USE_NAMESPACE() [1/3]

virtual antlr::ANTLRException::ANTLR_USE_NAMESPACE ( std ) 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.

◆ ANTLR_USE_NAMESPACE() [2/3]

antlr::ANTLRException::ANTLR_USE_NAMESPACE ( std )
private

◆ ANTLR_USE_NAMESPACE() [3/3]

virtual antlr::ANTLRException::ANTLR_USE_NAMESPACE ( std ) 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.

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