Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _UIEXCEPTION_H
00024 #define _UIEXCEPTION_H
00025
00026 #ifdef HAVE_CONFIG_H
00027 # include <config.h>
00028 #endif
00029
00030 #ifdef HAVE_EXCEPTION
00031 # include <exception>
00032 #endif
00033
00034 #ifdef HAVE_STRING
00035 # include <string>
00036 #endif
00037
00038 #include "../intl.h"
00039
00040 namespace YAPET {
00041 namespace UI {
00047 class UIException : public std::exception {
00048 private:
00049 std::string message;
00050
00051 public:
00052 inline UIException() throw() : exception(),
00053 message (_ ("Generic UI exception") ) {}
00054 inline UIException (std::string msg) throw() : exception(),
00055 message (msg) {}
00056 inline UIException (const UIException& ex) throw() {
00057 message = ex.message;
00058 }
00059 inline virtual ~UIException() throw() { }
00060 inline const UIException& operator= (const UIException& ex)
00061 throw() {
00062 if (this == &ex) return *this;
00063
00064 message = ex.message;
00065 return *this;
00066 }
00067 inline virtual const char* what() const throw() {
00068 return message.c_str();
00069 }
00070 };
00071
00072 }
00073 }
00074 #endif // _UIEXCEPTION_H