Beispiel #1
0
 public static String ErrorString(DBOperationErrorCode code)
 {
     switch (code)
     {
         case DBOperationErrorCode.ESuccess:
             { return "Success."; }
         case DBOperationErrorCode.EDataStoreInvalid:
             { return "Unknown database type."; }
         case DBOperationErrorCode.ECreateResultFailed:
             { return "Factory unable to create result for data operation."; }
         case DBOperationErrorCode.EInvalidOperation: // wrong factory registered for operation
             { return "Database operation associated with wrong transformation class."; }
         case DBOperationErrorCode.EUnregisteredOperation:
             { return "Database operation has not been implemented for this database type."; }
         case DBOperationErrorCode.EOperationRegoFailed:
             { return "Database operation registration failed."; }
         case DBOperationErrorCode.EUknownError:
             { return "Unknown database error."; }
         default:
             { return "Unknown error."; }
     }
 }
Beispiel #2
0
 public DataError(DBOperationErrorCode code, String msg)
 {
     m_ErrorCode = (int)code;
     m_ErrorString = msg;
 }
Beispiel #3
0
 public DataError(DBOperationErrorCode code)
 {
     m_ErrorCode = (int)code;
     m_ErrorString = ErrorString(code);
 }