Lines Matching refs:CustomError
1544 enum CustomError { enum
1549 impl fmt::Display for CustomError { implementation
1552 CustomError::SomeError => write!(f, "my custom error"), in fmt()
1553 CustomError::Sqlite(ref se) => write!(f, "my custom error: {}", se), in fmt()
1558 impl StdError for CustomError { implementation
1565 CustomError::SomeError => None, in cause()
1566 CustomError::Sqlite(ref se) => Some(se), in cause()
1571 impl From<Error> for CustomError { implementation
1572 fn from(se: Error) -> CustomError { in from() argument
1573 CustomError::Sqlite(se) in from()
1577 type CustomResult<T> = Result<T, CustomError>;
1648 .query_and_then(NO_PARAMS, |row| row.get(1).map_err(CustomError::Sqlite)) in test_query_and_then_custom_error()
1669 .query_and_then(NO_PARAMS, |row| row.get(1).map_err(CustomError::Sqlite)) in test_query_and_then_custom_error_fails()
1674 CustomError::Sqlite(Error::InvalidColumnType(..)) => (), in test_query_and_then_custom_error_fails()
1679 .query_and_then(NO_PARAMS, |row| row.get(3).map_err(CustomError::Sqlite)) in test_query_and_then_custom_error_fails()
1684 CustomError::Sqlite(Error::InvalidColumnIndex(_)) => (), in test_query_and_then_custom_error_fails()
1689 .query_and_then(NO_PARAMS, |_| Err(CustomError::SomeError)) in test_query_and_then_custom_error_fails()
1694 CustomError::SomeError => (), in test_query_and_then_custom_error_fails()
1710 row.get(1).map_err(CustomError::Sqlite) in test_query_row_and_then_custom_error()
1727 row.get(1).map_err(CustomError::Sqlite) in test_query_row_and_then_custom_error_fails()
1731 CustomError::Sqlite(Error::InvalidColumnType(..)) => (), in test_query_row_and_then_custom_error_fails()
1736 row.get(3).map_err(CustomError::Sqlite) in test_query_row_and_then_custom_error_fails()
1740 CustomError::Sqlite(Error::InvalidColumnIndex(_)) => (), in test_query_row_and_then_custom_error_fails()
1745 db.query_row_and_then(query, NO_PARAMS, |_| Err(CustomError::SomeError)); in test_query_row_and_then_custom_error_fails()
1748 CustomError::SomeError => (), in test_query_row_and_then_custom_error_fails()