Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

StorageMgr_Exceptions.h

Go to the documentation of this file.
00001 #ifndef StorageMgr_Exceptions_H 00002 #define StorageMgr_Exceptions_H 00003 00004 #include <assert.h> 00005 00006 #include <string> 00007 #include <exception> 00008 00009 using namespace std; 00010 00011 class SmException : public std::exception 00012 { 00013 public: 00014 // Creates a new SmException. 00015 // 00016 // Parameters: 00017 // location - An optional indication of which source file contains the code 00018 // that generated the exception. 00019 // lineNum - An optional indication of which line number in the specified 00020 // source file has the code that generated the exception. 00021 // description - An optional specification of supplementary information 00022 // regarding the exception. 00023 SmException(const string location, int lineNum, const string description); 00024 00025 00026 // Produces an SmException with an identical name and field definitions to those 00027 // of the supplied parameter. 00028 SmException(const SmException &src); 00029 00030 // Sets the left hand side SmException object have a name and field definitions 00031 // that are identical to those of the right-hand-side operand. 00032 SmException &operator=(const SmException & rhs); 00033 00034 // (No externally visible behavior.) 00035 virtual ~SmException() throw(); 00036 00037 const char *what() const throw(); 00038 00039 string getLocation() const; 00040 00041 int getLineNum() const; 00042 00043 string getDescription() const; 00044 00045 private: 00046 SmException() : _location(string("")), _lineNum(0), _description(string("")) {assert(false);} // This should never be called. 00047 string _location; 00048 int _lineNum; 00049 string _description; 00050 string _whatValue; 00051 }; 00052 00053 //======================================================================================== 00054 00055 class SmIllegalParameterValueException : public SmException 00056 { 00057 public: 00058 SmIllegalParameterValueException(const string location, int lineNum, const string description); 00059 }; 00060 00061 //======================================================================================== 00062 00063 class SmBufferTooSmallException : public SmException 00064 { 00065 public: 00066 SmBufferTooSmallException(const string location, int lineNum, const string description); 00067 }; 00068 00069 //======================================================================================== 00070 00071 class SmTooManyFieldsException : public SmException 00072 { 00073 public: 00074 SmTooManyFieldsException(const string location, int lineNum, const string description); 00075 }; 00076 00077 //======================================================================================== 00078 00079 class SmIllegalFieldNumException : public SmException 00080 { 00081 public: 00082 SmIllegalFieldNumException(const string location, int lineNum, const string description); 00083 }; 00084 00085 //======================================================================================== 00086 00087 class SmDatabaseLockedException : public SmException 00088 { 00089 public: 00090 SmDatabaseLockedException(const string location, int lineNum, const string description); 00091 }; 00092 00093 //======================================================================================== 00094 00095 class SmDatabaseExistsException : public SmException 00096 { 00097 public: 00098 SmDatabaseExistsException(const string location, int lineNum, const string description); 00099 }; 00100 00101 //======================================================================================== 00102 00103 class SmDatabaseNotFoundException : public SmException 00104 { 00105 public: 00106 SmDatabaseNotFoundException(const string location, int lineNum, const string description); 00107 }; 00108 00109 //======================================================================================== 00110 00111 class SmFilesystemException : public SmException 00112 { 00113 public: 00114 SmFilesystemException(const string location, int lineNum, const string description); 00115 }; 00116 00117 //======================================================================================== 00118 00119 class SmInternalException : public SmException 00120 { 00121 public: 00122 SmInternalException(const string location, int lineNum, const string description); 00123 }; 00124 00125 //======================================================================================== 00126 00127 class SmNoFieldDefinedException : public SmException 00128 { 00129 public: 00130 SmNoFieldDefinedException(const string location, int lineNum, const string description); 00131 }; 00132 00133 //======================================================================================== 00134 00135 class SmWrongFieldTypeException : public SmException 00136 { 00137 public: 00138 SmWrongFieldTypeException(const string location, int lineNum, const string description); 00139 }; 00140 00141 //======================================================================================== 00142 00143 class SmIllegalFieldLengthException : public SmException 00144 { 00145 public: 00146 SmIllegalFieldLengthException(const string location, int lineNum, const string description); 00147 }; 00148 00149 //======================================================================================== 00150 00151 class SmDatabaseClosedException : public SmException 00152 { 00153 public: 00154 SmDatabaseClosedException(const string location, int lineNum, const string description); 00155 }; 00156 00157 //======================================================================================== 00158 00159 class SmObjectAlreadyDefinedException : public SmException 00160 { 00161 public: 00162 SmObjectAlreadyDefinedException(const string location, int lineNum, const string description); 00163 }; 00164 00165 //======================================================================================== 00166 00167 class SmObjectNotDefinedException : public SmException 00168 { 00169 public: 00170 SmObjectNotDefinedException(const string location, int lineNum, const string description); 00171 }; 00172 00173 //======================================================================================== 00174 00175 class SmAlreadyUnpinnedException : public SmException 00176 { 00177 public: 00178 SmAlreadyUnpinnedException(const string location, int lineNum, const string description); 00179 }; 00180 00181 //======================================================================================== 00182 00183 class SmDifferentRecordTypesException : public SmException 00184 { 00185 public: 00186 SmDifferentRecordTypesException(const string location, int lineNum, const string description); 00187 }; 00188 00189 //======================================================================================== 00190 00191 class SmPageListAlreadyActiveException : public SmException 00192 { 00193 public: 00194 SmPageListAlreadyActiveException(const string location, int lineNum, const string description); 00195 }; 00196 00197 //======================================================================================== 00198 00199 class SmQBaseNotHistoricalException : public SmException 00200 { 00201 public: 00202 SmQBaseNotHistoricalException(const string location, int lineNum, const string description); 00203 }; 00204 00205 //======================================================================================== 00206 00207 class SmFieldNumUndefinedException : public SmException 00208 { 00209 public: 00210 SmFieldNumUndefinedException(const string location, int lineNum, const string description); 00211 }; 00212 00213 //======================================================================================== 00214 00215 class SmFieldNumInUseException : public SmException 00216 { 00217 public: 00218 SmFieldNumInUseException(const string location, int lineNum, const string description); 00219 }; 00220 00221 //======================================================================================== 00222 00223 class SmQueueClosedException : public SmException 00224 { 00225 public: 00226 SmQueueClosedException(const string location, int lineNum, const string description); 00227 }; 00228 00229 //======================================================================================== 00230 00231 class SmObjectNotLockedException : public SmException 00232 { 00233 public: 00234 SmObjectNotLockedException(const string location, int lineNum, const string description); 00235 }; 00236 00237 //======================================================================================== 00238 00239 class SmIllegalFrameNumException : public SmException 00240 { 00241 public: 00242 SmIllegalFrameNumException(const string location, int lineNum, const string description); 00243 }; 00244 00245 //======================================================================================== 00246 00247 class SmInvalidUserLockStateException : public SmException 00248 { 00249 public: 00250 SmInvalidUserLockStateException(const string location, int lineNum, const string description); 00251 }; 00252 00253 //======================================================================================== 00254 00255 class SmEmptyContainerException : public SmException 00256 { 00257 public: 00258 SmEmptyContainerException(const string location, int lineNum, const string description); 00259 }; 00260 00261 //======================================================================================== 00262 00263 class SmClosedException : public SmException 00264 { 00265 public: 00266 SmClosedException(const string location, int lineNum, const string description); 00267 }; 00268 00269 //======================================================================================== 00270 00271 class SmTooFullException : public SmException 00272 { 00273 public: 00274 SmTooFullException(const string location, int lineNum, const string description); 00275 }; 00276 00277 //======================================================================================== 00278 00279 class SmNotAllocatedException : public SmException 00280 { 00281 public: 00282 SmNotAllocatedException(const string location, int lineNum, const string description); 00283 }; 00284 00285 //======================================================================================== 00286 00287 class SmFileSystemFullException : public SmException 00288 { 00289 public: 00290 SmFileSystemFullException(const string location, int lineNum, const string description); 00291 }; 00292 00293 //======================================================================================== 00294 00295 class SmFileFullException : public SmException 00296 { 00297 public: 00298 SmFileFullException(const string location, int lineNum, const string description); 00299 }; 00300 00301 //======================================================================================== 00302 00303 class SmTrainStepSuspendedException : public SmException 00304 { 00305 public: 00306 SmTrainStepSuspendedException(const string location, int lineNum, const string description); 00307 }; 00308 00309 //======================================================================================== 00310 00311 #endif

Generated on Fri Nov 12 15:15:22 2004 for Borealis by doxygen 1.3.8