18f027e4462aaac1534016acd4a8cea1cb10ac71
[cvc5.git] / src / core / parser_exception.h
1 /********************* -*- C++ -*- */
2 /** parser_exception.h
3 ** This file is part of the CVC4 prototype.
4 ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
5 ** Courant Institute of Mathematical Sciences
6 ** New York University
7 ** See the file COPYING in the top-level source directory for licensing
8 ** information.
9 **
10 ** Exception class.
11 **/
12
13 #ifndef __CVC4_PARSER_EXCEPTION_H
14 #define __CVC4_PARSER_EXCEPTION_H
15
16 #include "core/exception.h"
17 #include <string>
18 #include <iostream>
19
20 namespace CVC4 {
21
22 class ParserException: public Exception {
23 public:
24 // Constructors
25 ParserException() { }
26 ParserException(const std::string& msg): Exception(msg) { }
27 ParserException(const char* msg): Exception(msg) { }
28 // Destructor
29 virtual ~ParserException() { }
30 virtual std::string toString() const {
31 return "Parse Error: " + d_msg;
32 }
33 }; // end of class ParserException
34
35 }/* CVC4 namespace */
36
37 #endif /* __CVC4_PARSER_EXCEPTION_H */