pub enum HdbError {
Conversion(ConversionError),
Deserialization(DeserializationError),
DbError(ServerError),
DbIssue(String),
MixedResults(Vec<ExecutionResult>),
Cesu8(Cesu8DecodingError),
Evaluation(String),
Impl(String),
Io(Error),
Poison(String),
Serialization(SerializationError),
Usage(String),
}
Represents all possible errors that can occur in hdbconnect.
Conversion of single db value to rust type failed.
Error occured in deserialization of data structures into an application-defined structure.
Database server responded with an error.
Database server has a severe issue.
Database server responded with at least one error.
Some error occured while reading CESU-8.
Error occured while evaluating a HdbResponse object.
Missing or wrong implementation of HANA's wire protocol.
IO error occured in communication with the database.
Error occured in thread synchronization.
Error occured in serialization of rust data into values for the
database.
Error due to wrong usage of API.
Return the contained server_error, if any.
This method helps in case you need programmatic access to e.g. the error code.
Example:
if let Err(hdberror) = hdb_result {
if let Some(server_error) = hdberror.server_error() {
let sys_m_error_code: (i32, String, String) = connection
.query(&format!(
"select * from SYS.M_ERROR_CODES where code = {}",
server_error.code()
))?.try_into()?;
println!("sys_m_error_code: {:?}", sys_m_error_code);
}
}
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
The lower-level source of this error, if any. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static