Generic hardware access library
/home/cschwick/hal/generic/include/hal/HardwareProblemException.hh
Go to the documentation of this file.
00001 #ifndef __HardwareProblemException
00002 #define __HardwareProblemException
00003 
00004 #include <string>
00005 
00006 #include "hal/HardwareAccessException.hh"
00007 
00008 namespace HAL {
00009 
00022 class HardwareProblemException : public HardwareAccessException {
00023 public:
00024   ~HardwareProblemException() throw() {};
00025   HardwareProblemException() 
00026     : name("HardwareProblemException" ) {
00027       whatString = "(HardwareProblemException) There is a problem with the hardware."; 
00028   }
00029 
00030   HardwareProblemException( std::string text ) 
00031     : name( "HardwareProblemException"),  
00032       whatString( "(" + name + ") " + text ) {
00033   }
00034 
00035   const char *what() const throw() {
00036     return whatString.c_str();
00037   }
00038 
00039 private :
00040   std::string name;
00041   std::string whatString ;
00042 };
00043 
00044 } /* namespace HAL */
00045 
00046 #endif /* __HardwareProblemException */