00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _SpatialException_h
00016 #define _SpatialException_h
00017
00018 #include "SpatialGeneral.h"
00019
00028 class LINKAGE SpatialException {
00029 public:
00037 SpatialException( const char *what = 0, int defIndex = 1 ) throw();
00038
00047 SpatialException( const char *context, const char *because,
00048 int defIndex = 1) throw();
00049
00051 SpatialException( const SpatialException& ) throw();
00052
00054 SpatialException& operator=( const SpatialException& ) throw();
00055
00057 virtual ~SpatialException() throw();
00058
00060 virtual const char *what() const throw();
00061
00063 int slen(const char *) const;
00064
00066 void clear();
00067
00069 static const char *defaultstr[];
00070
00071 protected:
00073 char * str_;
00074 };
00075
00082 class LINKAGE SpatialUnimplemented : public SpatialException {
00083 public:
00085 SpatialUnimplemented( const char *what = 0 ) throw();
00086
00088 SpatialUnimplemented( const char *context, const char *because ) throw();
00089
00091 SpatialUnimplemented( const SpatialUnimplemented& ) throw();
00092 };
00093
00102 class LINKAGE SpatialFailure : public SpatialException {
00103 public:
00105 SpatialFailure( const char *what = 0 ) throw();
00106
00108 SpatialFailure( const char *context, const char *because ) throw();
00109
00111 SpatialFailure( const char *context, const char *operation,
00112 const char *resource, const char *because = 0 ) throw();
00113
00115 SpatialFailure( const SpatialFailure& ) throw();
00116 };
00117
00126 class LINKAGE SpatialBoundsError : public SpatialException {
00127 public:
00129 SpatialBoundsError( const char *what = 0 ) throw();
00130
00136 SpatialBoundsError( const char *context
00137 , const char *array, int32 limit =-1, int32 index=-1 ) throw();
00138
00140 SpatialBoundsError( const SpatialBoundsError& ) throw();
00141 };
00142
00152 class LINKAGE SpatialInterfaceError : public SpatialException {
00153 public:
00155 SpatialInterfaceError( const char *what = 0 ) throw();
00156
00158 SpatialInterfaceError( const char *context, const char *because ) throw();
00159
00161 SpatialInterfaceError( const char *context,
00162 const char *argument, const char *because ) throw();
00163
00165 SpatialInterfaceError( const SpatialInterfaceError& ) throw();
00166 };
00167
00168 #endif