pub enum Error {
Show 37 variants
InvalidPacketType(u8),
InvalidMessageType(u8),
PacketTooShort {
expected: usize,
actual: usize,
},
UnexpectedPacketType {
expected: PacketType,
actual: PacketType,
},
ProtocolVersionNotSupported(u16, u16),
Protocol(String),
ProtocolError(String),
BufferUnderflow {
needed: usize,
available: usize,
},
BufferOverflow {
needed: usize,
available: usize,
},
InvalidLengthIndicator(u8),
ConnectionRefused {
error_code: Option<u32>,
message: Option<String>,
},
ConnectionRedirected {
address: String,
},
ConnectionRedirect(String),
ConnectionClosed,
ConnectionClosedByServer(String),
ConnectionNotReady,
CursorClosed,
InvalidCursor(String),
ConnectionTimeout(Duration),
InvalidConnectionString(String),
InvalidServiceName {
service_name: Option<String>,
message: Option<String>,
},
InvalidSid {
sid: Option<String>,
message: Option<String>,
},
AuthenticationFailed(String),
InvalidCredentials,
UnsupportedVerifierType(u32),
OracleError {
code: u32,
message: String,
},
SqlError(String),
NoDataFound,
ServerError {
code: u32,
message: String,
},
InvalidDataType(u16),
InvalidOracleType(u8),
DataConversionError(String),
UnexpectedNull,
Io(Error),
FeatureNotSupported(String),
NativeNetworkEncryptionRequired,
Internal(String),
}Expand description
Main error type for the Oracle driver
Variants§
InvalidPacketType(u8)
Invalid packet type received
InvalidMessageType(u8)
Invalid message type received
PacketTooShort
Packet too short to contain valid header
UnexpectedPacketType
Unexpected packet type received
ProtocolVersionNotSupported(u16, u16)
Protocol version not supported
Protocol(String)
General protocol error
ProtocolError(String)
Protocol error (alternate form)
BufferUnderflow
Buffer underflow - not enough data to read
BufferOverflow
Buffer overflow - not enough space to write
InvalidLengthIndicator(u8)
Invalid length indicator
ConnectionRefused
Connection refused by server
ConnectionRedirected
Connection redirected
ConnectionRedirect(String)
Connection redirect (simple form)
ConnectionClosed
Connection closed unexpectedly
ConnectionClosedByServer(String)
Connection closed by server with reason
ConnectionNotReady
Connection not ready for operations
CursorClosed
Cursor is closed
InvalidCursor(String)
Invalid cursor state
ConnectionTimeout(Duration)
Connection timeout
InvalidConnectionString(String)
Invalid connection string
InvalidServiceName
Invalid service name (ORA-12514)
InvalidSid
Invalid SID (ORA-12505)
AuthenticationFailed(String)
Authentication failed
InvalidCredentials
Invalid credentials
UnsupportedVerifierType(u32)
Unsupported verifier type
OracleError
Oracle database error with error code
SqlError(String)
SQL execution error
NoDataFound
No data found
ServerError
Server error with code and message
InvalidDataType(u16)
Invalid data type
InvalidOracleType(u8)
Invalid Oracle type number
DataConversionError(String)
Data conversion error
UnexpectedNull
NULL value encountered where not expected
Io(Error)
Underlying I/O error
FeatureNotSupported(String)
Feature not supported
NativeNetworkEncryptionRequired
Native network encryption required but not supported
Internal(String)
Internal error (should not happen)
Implementations§
Source§impl Error
impl Error
Sourcepub fn oracle(code: u32, message: impl Into<String>) -> Self
pub fn oracle(code: u32, message: impl Into<String>) -> Self
Create a new Oracle database error
Sourcepub fn is_no_data_found(&self) -> bool
pub fn is_no_data_found(&self) -> bool
Check if this is a “no data found” error
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Check if this is a connection-related error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable (can retry)