Add source annotations to errors (#1999)
This commit is contained in:
parent
3d6124393a
commit
a1396f3679
@ -17,7 +17,7 @@ use thiserror::Error;
|
|||||||
pub enum DbErr {
|
pub enum DbErr {
|
||||||
/// This error can happen when the connection pool is fully-utilized
|
/// This error can happen when the connection pool is fully-utilized
|
||||||
#[error("Failed to acquire connection from pool: {0}")]
|
#[error("Failed to acquire connection from pool: {0}")]
|
||||||
ConnectionAcquire(ConnAcquireErr),
|
ConnectionAcquire(#[source] ConnAcquireErr),
|
||||||
/// Runtime type conversion error
|
/// Runtime type conversion error
|
||||||
#[error("Error converting `{from}` into `{into}`: {source}")]
|
#[error("Error converting `{from}` into `{into}`: {source}")]
|
||||||
TryIntoErr {
|
TryIntoErr {
|
||||||
@ -92,7 +92,7 @@ pub enum RuntimeErr {
|
|||||||
/// SQLx Error
|
/// SQLx Error
|
||||||
#[cfg(feature = "sqlx-dep")]
|
#[cfg(feature = "sqlx-dep")]
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
SqlxError(sqlx::error::Error),
|
SqlxError(#[source] sqlx::error::Error),
|
||||||
/// Error generated from within SeaORM
|
/// Error generated from within SeaORM
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
Internal(String),
|
Internal(String),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user