ANTLR Support Libraries 2.7.1+
Loading...
Searching...
No Matches
ANTLRException.hpp
Go to the documentation of this file.
1#ifndef INC_ANTLRException_hpp__
2#define INC_ANTLRException_hpp__
3
4/* ANTLR Translator Generator
5 * Project led by Terence Parr at http://www.jGuru.com
6 * Software rights: http://www.antlr.org/license.html
7 *
8 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ANTLRException.hpp#2 $
9 */
10
11#include <antlr/config.hpp>
12#include <string>
13
14#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
15namespace antlr {
16#endif
17
19{
20public:
22 ANTLRException() : text("")
23 {
24 }
27 : text(s)
28 {
29 }
30 virtual ~ANTLRException() throw()
31 {
32 }
33
38 virtual ANTLR_USE_NAMESPACE(std)string toString() const
39 {
40 return text;
41 }
42
48 virtual ANTLR_USE_NAMESPACE(std)string getMessage() const
49 {
50 return text;
51 }
52private:
54};
55#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
56}
57#endif
58
59#endif //INC_ANTLRException_hpp__
Definition: ANTLRException.hpp:19
ANTLRException(const std ::string &s)
Create ANTLR base exception with error message.
Definition: ANTLRException.hpp:26
virtual std::string getMessage() const
Definition: ANTLRException.hpp:48
virtual ~ANTLRException()
Definition: ANTLRException.hpp:30
ANTLRException()
Create ANTLR base exception without error message.
Definition: ANTLRException.hpp:22
std::string text
Definition: ANTLRException.hpp:53
virtual std::string toString() const
Definition: ANTLRException.hpp:38
#define ANTLR_USE_NAMESPACE(_x_)
Definition: config.hpp:18
#define ANTLR_API
Definition: config.hpp:22
Definition: ANTLRException.hpp:15