00001 00008 /* 00009 * AUTHOR : David Brooks (dtb26@cornell.edu) 00010 * PLATFORM : non-specific 00011 * DATE : 4/24/2012 11:00:02 AM 00012 * COPYRIGHT : TBD 00013 * 00014 * File : $Source:$ 00015 * Revision : $Revision:$ 00016 * Author : $Author:$ 00017 * Date : $Date:$ 00018 * Tag name : $Name:$ 00019 * Locker : $Locker:$ 00020 * State : $State: Exp $ 00021 */ 00022 00023 // MSVC++ 6.0 _MSC_VER = 1200 00024 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 00025 #pragma once 00026 #pragma warning( disable : 4996 ) 00027 #endif 00028 00029 #ifndef VET_EXCEPTS_H_INCLUDED 00030 #define VET_EXCEPTS_H_INCLUDED 00031 #include <stdexcept> 00032 #include <string> 00033 00041 namespace cornelluniversity { 00042 00051 class vetsim_exception : public std::runtime_error { 00052 public: 00058 vetsim_exception( const std::string & errstr ) : std::runtime_error(errstr){;} 00065 vetsim_exception( const char * errstr ) : std::runtime_error(std::string(errstr)){;} 00072 inline virtual const std::string details( void ) const { return(std::string(this->what())); } 00073 private: 00074 vetsim_exception( void ) : std::runtime_error("unavailable"){;} 00075 }; //eoc vetsim_exception 00076 00084 class vetsim_serial : public vetsim_exception { 00085 public: 00091 vetsim_serial( const std::string & errstr ) : vetsim_exception(errstr){;} 00092 vetsim_serial( const vetsim_serial & copyref ) : vetsim_exception(copyref.what()){;} 00099 vetsim_serial( const char * errstr ) : vetsim_exception(std::string(errstr)){;} 00100 private: 00101 vetsim_serial(void) : vetsim_exception("unavailable"){;} 00102 };//eoc 00103 00111 class vetsim_badchksum : public vetsim_exception { 00112 public: 00118 vetsim_badchksum( const std::string & errstr ) : vetsim_exception(errstr){;} 00125 vetsim_badchksum( const char * errstr ) : vetsim_exception(std::string(errstr)){;} 00126 private: 00127 vetsim_badchksum(void) : vetsim_exception("unavailable"){;} 00128 };//eoc 00129 00137 class vetsim_timeout : public vetsim_exception { 00138 public: 00144 vetsim_timeout( const std::string & errstr ) : vetsim_exception(errstr){;} 00151 vetsim_timeout( const char * errstr ) : vetsim_exception(std::string(errstr)){;} 00152 private: 00153 vetsim_timeout( void ): vetsim_exception("unavailable"){;} 00154 };//eoc 00155 00156 }//eon cornelluniversity 00157 00158 #endif /*VET_EXCEPTS_H_INCLUDED*/ 00159 00160 00161 /* 00162 VERSION LOG 00163 =========== 00164 $Log:$ 00165 00166 */