00001 /*****************************************************************************/ 00002 /*! 00003 * \file typecheck_exception.h 00004 * \brief An exception to be thrown at typecheck error. 00005 * 00006 * Author: Sergey Berezin 00007 * 00008 * Created: Fri Feb 14 18:44:15 2003 00009 * 00010 * <hr> 00011 * 00012 * License to use, copy, modify, sell and/or distribute this software 00013 * and its documentation for any purpose is hereby granted without 00014 * royalty, subject to the terms and conditions defined in the \ref 00015 * LICENSE file provided with this distribution. 00016 * 00017 * <hr> 00018 * 00019 */ 00020 /*****************************************************************************/ 00021 00022 #ifndef _cvc3__typecheck_exception_h_ 00023 #define _cvc3__typecheck_exception_h_ 00024 00025 #include <string> 00026 #include <iostream> 00027 #include "exception.h" 00028 00029 namespace CVC3 { 00030 00031 class TypecheckException: public Exception { 00032 public: 00033 // Constructors 00034 TypecheckException() { } 00035 TypecheckException(const std::string& msg): Exception(msg) { } 00036 TypecheckException(const char* msg): Exception(msg) { } 00037 // Destructor 00038 virtual ~TypecheckException() { } 00039 virtual std::string toString() const { 00040 return "Type Checking error: " + d_msg; 00041 } 00042 }; // end of class TypecheckException 00043 } // end of namespace CVC3 00044 00045 #endif