[−][src]Enum hdbconnect::HdbError
Represents all possible errors that can occur in hdbconnect.
Variants
Conversion(ConversionError)
Conversion of single db value to rust type failed.
Deserialization(DeserializationError)
Error occured in deserialization of data structures into an application-defined structure.
DbError(ServerError)
Database server responded with an error.
DbIssue(String)
Database server has a severe issue.
MixedResults(Vec<ExecutionResult>)
Database server responded with at least one error.
Cesu8(Cesu8DecodingError)
Some error occured while reading CESU-8.
Evaluation(String)
Error occured while evaluating a HdbResponse object.
Impl(String)
Missing or wrong implementation of HANA's wire protocol.
Io(Error)
IO error occured in communication with the database.
Poison(String)
Error occured in thread synchronization.
Serialization(SerializationError)
Error occured in serialization of rust data into values for the database.
Usage(String)
Error due to wrong usage of API.
Methods
impl HdbError
[src]
pub fn server_error(&self) -> Option<&ServerError>
[src]
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); } }
Trait Implementations
impl From<ConversionError> for HdbError
[src]
fn from(error: ConversionError) -> HdbError
[src]
impl From<DeserializationError> for HdbError
[src]
fn from(error: DeserializationError) -> HdbError
[src]
impl From<SerializationError> for HdbError
[src]
fn from(error: SerializationError) -> HdbError
[src]
impl From<String> for HdbError
[src]
impl From<Error> for HdbError
[src]
impl From<Error> for HdbError
[src]
impl From<Cesu8DecodingError> for HdbError
[src]
fn from(error: Cesu8DecodingError) -> HdbError
[src]
impl<'a, T> From<PoisonError<MutexGuard<'a, T>>> for HdbError
[src]
fn from(error: PoisonError<MutexGuard<'a, T>>) -> HdbError
[src]
impl From<HdbError> for DeserializationError
[src]
fn from(e: HdbError) -> DeserializationError
[src]
impl From<HdbError> for RmError
[src]
impl Display for HdbError
[src]
impl Debug for HdbError
[src]
impl Error for HdbError
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self