00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FXEXCEPTION_H
00025 #define FXEXCEPTION_H
00026
00027
00028 namespace FX {
00029
00030
00031 class FXAPI FXException {
00032 private:
00033 const FXchar *message;
00034 private:
00035 static const FXchar exceptionName[];
00036 public:
00037 FXException():message(FXException::exceptionName){}
00038 FXException(const FXchar *msg):message(msg){}
00039 const FXchar *what() const { return message; }
00040 ~FXException(){}
00041 };
00042
00043
00044
00045 class FXAPI FXErrorException : public FXException {
00046 private:
00047 static const FXchar exceptionName[];
00048 public:
00049 FXErrorException():FXException(FXErrorException::exceptionName){}
00050 FXErrorException(const FXchar *msg):FXException(msg){}
00051 };
00052
00053
00054
00055 class FXAPI FXRangeException : public FXErrorException {
00056 private:
00057 static const FXchar exceptionName[];
00058 public:
00059 FXRangeException():FXErrorException(FXRangeException::exceptionName){}
00060 FXRangeException(const FXchar *msg):FXErrorException(msg){}
00061 };
00062
00063
00064
00065 class FXAPI FXPointerException : public FXErrorException {
00066 private:
00067 static const FXchar exceptionName[];
00068 public:
00069 FXPointerException():FXErrorException(FXPointerException::exceptionName){}
00070 FXPointerException(const FXchar *msg):FXErrorException(msg){}
00071 };
00072
00073
00074
00075 class FXAPI FXResourceException : public FXException {
00076 private:
00077 static const FXchar exceptionName[];
00078 public:
00079 FXResourceException():FXException(FXResourceException::exceptionName){}
00080 FXResourceException(const FXchar *msg):FXException(msg){}
00081 };
00082
00083
00084
00085 class FXAPI FXMemoryException : public FXResourceException {
00086 private:
00087 static const FXchar exceptionName[];
00088 public:
00089 FXMemoryException():FXResourceException(FXMemoryException::exceptionName){}
00090 FXMemoryException(const FXchar *msg):FXResourceException(msg){}
00091 };
00092
00093 }
00094
00095 #endif