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; }
}
null.MCO_RET_E value corresponding to errorCode.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;
}
MCO_RET_E code associated with the detailed error record.
public enum MCO_RET_E
{
MCO_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.