OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
antlr::ANTLRException Class Reference
+ Inheritance diagram for antlr::ANTLRException:

Public Member Functions

 ANTLRException ()
 Create ANTLR base exception without error message.
 
 ANTLRException (const std ::string &s)
 Create ANTLR base exception with error message.
 
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)
 

Detailed Description

Definition at line 18 of file ANTLRException.hpp.

Constructor & Destructor Documentation

◆ ANTLRException() [1/2]

antlr::ANTLRException::ANTLRException ( )
inline

Create ANTLR base exception without error message.

Definition at line 22 of file ANTLRException.hpp.

◆ ANTLRException() [2/2]

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

Create ANTLR base exception with error message.

Definition at line 26 of file ANTLRException.hpp.

◆ ~ANTLRException()

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

Definition at line 30 of file ANTLRException.hpp.

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.

Reimplemented in antlr::MismatchedCharException, antlr::MismatchedTokenException, antlr::NoViableAltException, and antlr::NoViableAltForCharException.

Definition at line 48 of file ANTLRException.hpp.

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

◆ 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.

Reimplemented in antlr::RecognitionException, and antlr::TokenStreamRecognitionException.

Definition at line 38 of file ANTLRException.hpp.


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