00001 00002 #ifndef DEF_d_ErrorCodes 00003 #define DEF_d_ErrorCodes 00004 //------------------------------------------------------------------------------ 00005 00006 // Internal. 00007 struct oErrorMessage 00008 { 00009 // Internal. 00010 long kind; 00011 00012 // Internal. 00013 char* message; 00014 }; 00015 //------------------------------------------------------------------------------ 00016 extern oErrorMessage db_errors[]; 00017 00018 //------------------------------------------------------------------------------ 00019 00020 // Orient ODBMS error codes 00021 // 00022 enum oErrors 00023 { 00024 // ODMG 3.0 EXCEPTIONS (0 - 1999) 00025 d_Error_None = 0, // NO ERRORS 00026 00027 d_Error_DatabaseClassMismatch = 1000, // Local (client) class definition doesn't match to the server class definition 00028 d_Error_DatabaseClassUndefined, // The class is not registered in the database schema 00029 d_Error_DatabaseClosed, // The database has already been closed 00030 d_Error_DatabaseOpen, // The database is already open 00031 d_Error_DateInvalid, // The value of d_Date object is invalid 00032 d_Error_ElementNotFound, // 00033 d_Error_IteratorDifferentCollections, // 00034 d_Error_IteratorExhaused, // The iterator is exhaused 00035 d_Error_IteratorNotBackward, // 00036 d_Error_MemberIsOfInvalidType, // 00037 d_Error_MemberNotFound, // 00038 d_Error_NameNotUnique, // The attemp to assign already used name to another object 00039 d_Error_PositionOutOfRange, // 00040 d_Error_QueryParameterCountInvalid, // The parameter count doesn't match to the actual number of parameters in the queue 00041 d_Error_QueryParameterTypeInvalid, // The parameter type doesn't match to the actual type of parameter in the queue 00042 d_Error_RefInvalid, // The reference is invalid and the database cannot resolve it 00043 d_Error_RefNull, // The reference is null 00044 d_Error_TimeInvalid, // The value of d_Time object is invalid 00045 d_Error_TimestampInvalid, // The value of d_Timestamp object is invalid 00046 d_Error_TransactionNotOpen, // The transaction is not open 00047 d_Error_TransactionOpen, // The transaction is already open 00048 d_Error_TypeInvalid, // The type is invalid and cannot be safely converted to the requested type 00049 00050 00051 // ORIENT CUSTOM EXCEPTION: 00052 00053 // ORIENT (2000 - 2099) 00054 d_Error_ManagerInit = 2000, // Cannot initialize the Orient Manager 00055 d_Error_ManagerSysReg, // Cannot register the system interfaces 00056 d_Error_ManagerUserReg, // Cannot register the user interfaces 00057 00058 // OBJECT (2100 - 2199) 00059 d_Error_ObjectInvalidOID = 2100, // The object has an invalid oid (corrupted?) 00060 d_Error_ObjectLocked, // The object is already locked in exclusive mode 00061 d_Error_ObjectNotCreated, // Cannot create persistent object in database 00062 d_Error_ObjectNotModified, // Cannot modify persistent object in database 00063 d_Error_ObjectNotDeleted, // Cannot delete persistent object in database 00064 d_Error_ObjectNotLoaded, // Cannot load persistent object in database 00065 d_Error_ObjectNotReserved, // Cannot reserve space for persistent object in database 00066 d_Error_ObjectNotConfirmed, // Cannot confirm space for persistent object in database 00067 00068 // EXTENT (2200 - 2299) 00069 d_Error_ExtentInvalid = 2200, // The extent is invalid 00070 00071 // LICENSE (2300 - 2399) 00072 d_Error_LicenseError = 2300, // Error on validating license 00073 d_Error_LicenseLimit, // Operation not permitted with this kind of license 00074 00075 // FILES (2400 - 2499) 00076 d_Error_FileNotFound = 2400, // File not found 00077 d_Error_FilePathError, // Error in segment path 00078 d_Error_FileLocked, // File locked by another process 00079 d_Error_FileName, // Wrong filename 00080 d_Error_FileUnknowError, // Unknow error happened on file 00081 00082 // STRINGS (2500 - 2599) 00083 d_Error_StringOutOfBound = 2500, // Attempt to access to an element out of string 00084 00085 // DATABASE (3100 - 3199) 00086 d_Error_DatabaseNotOpen = 3100, // Cannot open the database 00087 d_Error_DatabaseNotClosed, // Cannot close the database 00088 d_Error_DatabaseNotCreated, // Cannot create the database 00089 d_Error_DatabaseAlreadyExists, // Database already exist 00090 d_Error_DatabaseDomainNotFound, // Cannot found a classes domain for database 00091 d_Error_DatabaseNotExtended, // Cannot extend the database 00092 d_Error_DatabaseClassNotCreated, // Cannot create a class into the database 00093 d_Error_DatabaseClassNotFound, // Class not found in database 00094 d_Error_DatabaseNotFound, // Database not found 00095 d_Error_DatabasePathError, // Error in database path 00096 d_Error_DatabaseLocked, // Database locked by another process 00097 d_Error_DatabaseIsClosed, // Database is closed 00098 d_Error_DatabaseIsNull, // Database object is null 00099 00100 // QUERY (3200 - 3299) 00101 d_Error_QuerySyntaxError = 3200, // Syntax error in query predicate 00102 d_Error_QueryEngineNotFound, // Cannot found the requested query engine 00103 d_Error_QueryUnknownSymbol, // Unknown symbol 00104 d_Error_QueryUnknownClassMember, // Unknown class member 00105 d_Error_QueryUnknownType, // Unknown type 00106 d_Error_QueryUnterminatedString, // Unterminated string found 00107 d_Error_QueryExecutionError, // Error on query execution 00108 d_Error_QueryOperationNotSuported, // Operation not supported 00109 00110 // MEMORY (3300 - 3399) 00111 d_Error_OutOfMemory = 3300, // Cannot allocate memory 00112 00113 // TRANSACTIONS (3400 - 3499) 00114 d_Error_TransactionCommitError = 3400, // Error on transaction commit 00115 d_Error_TransactionCheckpointError, // Error on transaction checkpoint 00116 00117 // SESSIONS (3500 - 3599) 00118 d_Error_SessionNotCreated = 3500, // Error on creating new session 00119 d_Error_SessionNotFound, // Session not found 00120 d_Error_SessionNoMT, // Cannot create a new session because this is the single-thread version 00121 d_Error_SessionError, // Database error not caught in user session 00122 d_Error_SessionException, // Exception not caught in user session 00123 00124 // TRIGGERS (3600 - 3699) 00125 d_Error_TriggerBeforeNew = 3600, // Trigger d_beforeNew() returned false 00126 d_Error_TriggerOnUpdate, // Trigger d_onUpdate() returned false 00127 d_Error_TriggerBeforeUpdate, // Trigger d_beforeUpdate() returned false 00128 00129 // THREADS (3700 - 3799) 00130 d_Error_ThreadNotCreated = 3700, // Error on creating new thread 00131 00132 // ORIENT ENVIRONMENT (3800 - 3899) 00133 d_Error_OrientNotInit = 3800, // The Orient environment is not yet initialized 00134 d_Error_OrientForcedShutdown, // Shutdown forced due to catched signal 00135 00136 // SEGMENTS (3900 - 3999) 00137 d_Error_SegmentNotOpen = 3900, // Cannot open the segment 00138 d_Error_SegmentNotCreated, // Cannot create the segment 00139 d_Error_SegmentNotExtended, // Cannot extend the segment 00140 d_Error_SegmentNotExtendable, // The segment need to be extented, but is not configured as extendable 00141 d_Error_SegmentNotShrunken, // Cannot shrink the segment 00142 d_Error_SegmentDataNotModified, // Cannot modify data in segment 00143 d_Error_SegmentOutOfData, // Attempt to access out of data range 00144 00145 // DATA-SEGMENTS (4000 - 4099) 00146 d_Error_DataSegBlockNotMoved = 4000, // Cannot move a data block 00147 00148 // STORAGES (4100 - 4199) 00149 d_Error_StorageRefSegNotFound = 4100, // Refseg not found 00150 d_Error_StorageDataSegNotFound, // Data Segment not found 00151 d_Error_StorageRecordNotFound, // Record not found 00152 d_Error_StorageRecordDeleted, // Record is deleted 00153 d_Error_StorageRecordAlreadyDeleted, // Record is already deleted 00154 d_Error_StorageRefSegNotAdded, // Cannot adding ref segment 00155 d_Error_StorageDataSegNotAdded, // Cannot adding data segment 00156 d_Error_StorageNotFound, // Storage not found 00157 00158 // CACHE (4200 - 4299) 00159 d_Error_CacheObjectNotFound = 4200, // Cannot found the requested object in cache 00160 d_Error_CacheObjectNotInserted, // Cannot insert object in cache 00161 d_Error_CacheObjectNotUpdated, // Cannot update object in cache because the transaction doesn't locked it previously 00162 d_Error_CacheObjectNotLocked, // Cannot lock the object in cache because is used by other transactions 00163 d_Error_CacheObjectNotReleased, // Cannot release object in cache because the transaction in not the owner 00164 00165 // SIGNALS (5000 - 5099) 00166 d_Error_SignalAbort = 5000, // The application has caught a SIGABRT signal 00167 d_Error_SignalBreak, // The application has caught a SIGBREAK signal 00168 d_Error_SignalArithmetic, // The application has caught a SIGFPE signal 00169 d_Error_SignalIllegal, // The application has caught a SIGILL signal 00170 d_Error_SignalInterruption, // The application has caught a SIGINT signal 00171 d_Error_SignalSegmViol, // The application has caught a SIGSEGV signal 00172 d_Error_SignalTermination, // The application has caught a SIGTERM signal 00173 d_Error_SignalUnknown, // The application has caught a unhandled signal 00174 00175 // STREAM PROTOCOL (5100 - 5199) 00176 d_Error_StreamProtocolNotFound = 5100, // Cannot found the requested stream protocol 00177 00178 // MANAGER (5200 - 5299) 00179 d_Error_ObjectNotRegistered = 5200, // Cannot register object in oManager class (or inherited) 00180 00181 // END 00182 d_Error_End // END OF LIST 00183 }; 00184 //------------------------------------------------------------------------------ 00185 //------------------------------------------------------------------------------ 00186 00187 #endif 00188
1.3-rc1