CVC3
eval_exception.h
Go to the documentation of this file.
1 /*****************************************************************************/
2 /*!
3  * \file eval_exception.h
4  *
5  * Author: Sergey Berezin
6  *
7  * Created: Tue Feb 25 14:58:57 2003
8  *
9  * <hr>
10  *
11  * License to use, copy, modify, sell and/or distribute this software
12  * and its documentation for any purpose is hereby granted without
13  * royalty, subject to the terms and conditions defined in the \ref
14  * LICENSE file provided with this distribution.
15  *
16  * <hr>
17  *
18  * An exception thrown on an error while evaluating a command. Use it
19  * only when the error does not fall under any of the standard cases
20  * like typecheck or parse errors.
21  */
22 /*****************************************************************************/
23 
24 #ifndef _cvc3__eval_exception_h_
25 #define _cvc3__eval_exception_h_
26 
27 #include "exception.h"
28 
29 namespace CVC3 {
30 class EvalException: public Exception {
31 public:
32  // Constructors
34  EvalException(const std::string& msg): Exception(msg) { }
35  EvalException(const char* msg): Exception(msg) { }
36  // Destructor
37  virtual ~EvalException() { }
38  // Printing the message
39  virtual std::string toString() const {
40  return "Error while evaluating a command:\n " + d_msg;
41  }
42 };
43 
44 class ResetException: public Exception {
45 public:
46  // Constructors
47  ResetException(): Exception("Reset Exception") { }
48  // Destructor
49  virtual ~ResetException() { }
50 };
51 
52 }
53 
54 #endif