00001 /*****************************************************************************/ 00002 /*! 00003 * \file eval_exception.h 00004 * 00005 * Author: Sergey Berezin 00006 * 00007 * Created: Tue Feb 25 14:58:57 2003 00008 * 00009 * <hr> 00010 * 00011 * License to use, copy, modify, sell and/or distribute this software 00012 * and its documentation for any purpose is hereby granted without 00013 * royalty, subject to the terms and conditions defined in the \ref 00014 * LICENSE file provided with this distribution. 00015 * 00016 * <hr> 00017 * 00018 * An exception thrown on an error while evaluating a command. Use it 00019 * only when the error does not fall under any of the standard cases 00020 * like typecheck or parse errors. 00021 */ 00022 /*****************************************************************************/ 00023 00024 #ifndef _cvc3__eval_exception_h_ 00025 #define _cvc3__eval_exception_h_ 00026 00027 #include "exception.h" 00028 00029 namespace CVC3 { 00030 class EvalException: public Exception { 00031 public: 00032 // Constructors 00033 EvalException() { } 00034 EvalException(const std::string& msg): Exception(msg) { } 00035 EvalException(char* msg): Exception(msg) { } 00036 // Destructor 00037 virtual ~EvalException() { } 00038 // Printing the message 00039 virtual std::string toString() const { 00040 return "Error while evaluating a command:\n " + d_msg; 00041 } 00042 }; 00043 00044 } 00045 00046 #endif