about summary refs log tree commit diff homepage
path: root/lib/SMT/parser_exception.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SMT/parser_exception.h')
-rw-r--r--lib/SMT/parser_exception.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/SMT/parser_exception.h b/lib/SMT/parser_exception.h
new file mode 100644
index 00000000..64a8f452
--- /dev/null
+++ b/lib/SMT/parser_exception.h
@@ -0,0 +1,46 @@
+/*****************************************************************************/
+/*!
+ * \file parser_exception.h
+ * \brief An exception thrown by the parser.
+ *
+ * Author: Sergey Berezin
+ *
+ * Created: Thu Feb  6 13:23:39 2003
+ *
+ * <hr>
+ *
+ * License to use, copy, modify, sell and/or distribute this software
+ * and its documentation for any purpose is hereby granted without
+ * royalty, subject to the terms and conditions defined in the \ref
+ * LICENSE file provided with this distribution.
+ *
+ * <hr>
+ *
+ */
+/*****************************************************************************/
+
+#ifndef _cvc3__parser_exception_h_
+#define _cvc3__parser_exception_h_
+
+#include "exception.h"
+#include <string>
+#include <iostream>
+
+namespace CVC3 {
+
+  class ParserException: public Exception {
+  public:
+    // Constructors
+    ParserException() { }
+    ParserException(const std::string& msg): Exception(msg) { }
+    ParserException(const char* msg): Exception(msg) { }
+    // Destructor
+    virtual ~ParserException() { }
+    virtual std::string toString() const {
+      return "Parse Error: " + d_msg;
+    }
+  }; // end of class ParserException
+
+} // end of namespace CVC3
+
+#endif