00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _OIS_EXCEPTION_HEADER_
00024 #define _OIS_EXCEPTION_HEADER_
00025
00026 namespace OIS
00027 {
00029 enum _OISExport OIS_ERROR
00030 {
00031 E_InputDisconnected,
00032 E_InputDeviceNonExistant,
00033 E_InputDeviceNotSupported,
00034 E_DeviceFull,
00035 E_NotSupported,
00036 E_NotImplemented,
00037 E_Duplicate,
00038 E_InvalidParam,
00039 E_General
00040 };
00041
00047 class _OISExport Exception
00048 {
00050 Exception() : eType(E_General), eLine(0), eFile(0) {}
00051 public:
00053 Exception( OIS_ERROR err, const char* str, int line, const char *file )
00054 : eType(err), eLine(line), eFile(file) ,eText(str) {}
00055
00057 const OIS_ERROR eType;
00059 const int eLine;
00061 const char* eFile;
00063 const char* eText;
00064 };
00065 }
00066
00068 #define OIS_EXCEPT( err, str ) throw( OIS::Exception(err, str, __LINE__, __FILE__) )
00069
00070 #endif //_OIS_EXCEPTION_HEADER_