00001
00002
00003 #ifndef _REC_ROBOTINO_COM_ROBOTINOEXCEPTION_H_
00004 #define _REC_ROBOTINO_COM_ROBOTINOEXCEPTION_H_
00005
00006 #include <exception>
00007 #include <string>
00008
00009 namespace rec
00010 {
00011 namespace robotino
00012 {
00013 namespace com
00014 {
00021 class RobotinoException : public std::exception
00022 {
00023 public:
00030 RobotinoException( const char* message )
00031 : _message( message )
00032 {
00033 }
00034
00035 RobotinoException( const std::exception &cause )
00036 : _message( cause.what() )
00037 {
00038 }
00039
00040 virtual ~RobotinoException() throw ()
00041 {
00042 }
00043
00051 virtual const char* what() const throw ()
00052 {
00053 return _message.c_str();
00054 }
00055
00056 private:
00057 const std::string _message;
00058 };
00059 }
00060 }
00061 }
00062
00063 #endif