DatabaseError is the exception type thrown by the eXtremeDB C# wrapper for runtime, storage, HA, TL, SQL, and other database errors. It exposes both the numeric error code and the typed MCO_RET_E status value, and it may also carry extended diagnostic information through ErrorInfo.
[Serializable]
public class DatabaseError : Exception
{
public readonly int errorCode;
public readonly ErrorInfo errorInfo;
public DatabaseError(int err, string description);
public DatabaseError(int err, string description, ErrorInfo ei);
public MCO_RET_E Status { get; }
public override string Message { get; }
}
DatabaseError classerrorCode
errorInfo
null.DatabaseError(int err, string description)
DatabaseError(int err, string description, ErrorInfo ei)
Status
MCO_RET_E value corresponding to errorCode.Message
MCO_RET_E name in the message text.DatabaseError when an API call can fail due to runtime conditions, then inspect errorCode, Status, and optional errorInfo to decide whether the error is expected, retryable, or fatal.Status when application code benefits from symbolic checks such as MCO_RET_E.MCO_E_CONFLICT or MCO_RET_E.MCO_S_NOTFOUND. Use errorCode when raw numeric values are needed for logging or compatibility with native documentation.
public class ErrorInfo
{
public MCO_RET_E rc;
public uint system_error;
public string filename;
public uint line;
}
ErrorInfo classrc
MCO_RET_E code associated with the detailed error record.system_error
filename
line
public enum MCO_RET_E
{
// MCO_S_* status values
// MCO_E_* error codes
// MCO_ERR_* fatal or internal error-code bases
}
MCO_RET_E enumerationMCO_S_*
MCO_E_*
MCO_ERR_*
MCO_S_OK, MCO_S_NOTFOUND, MCO_E_CONFLICT, MCO_E_CURSOR_CLOSED, MCO_E_INTERRUPTED, and many others defined by the runtime.