Skip to content

Commit 4ee2f89

Browse files
committed
errors: re-export from various modules
So they are accessible via scylla::errors
1 parent f4e70ab commit 4ee2f89

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

scylla/src/errors.rs

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
//! This module contains various errors which can be returned by [`Session`](crate::client::session::Session).
22
3-
// Re-export DbError type and types that it depends on
4-
// so they can be found in `scylla::errors`.
5-
pub use scylla_cql::frame::response::error::{DbError, OperationType, WriteType};
6-
73
use std::{
84
error::Error,
95
io::ErrorKind,
@@ -12,28 +8,34 @@ use std::{
128
sync::Arc,
139
};
1410

15-
use scylla_cql::{
16-
deserialize::{DeserializationError, TypeCheckError},
17-
frame::{
18-
frame_errors::{
19-
CqlAuthChallengeParseError, CqlAuthSuccessParseError, CqlAuthenticateParseError,
20-
CqlErrorParseError, CqlEventParseError, CqlRequestSerializationError,
21-
CqlResponseParseError, CqlResultParseError, CqlSupportedParseError,
22-
FrameBodyExtensionsParseError, FrameHeaderParseError,
23-
},
24-
request::CqlRequestKind,
25-
response::CqlResponseKind,
26-
},
27-
serialize::SerializationError,
28-
};
29-
3011
use thiserror::Error;
3112

32-
use crate::client::pager::NextPageError;
33-
use crate::{authentication::AuthError, frame::response};
13+
use crate::frame::response;
14+
15+
// Re-export error types from pager module.
16+
pub use crate::client::pager::{NextPageError, NextRowError};
3417

35-
use crate::client::pager::NextRowError;
36-
use crate::response::query_result::{IntoRowsResultError, SingleRowError};
18+
// Re-export error types from query_result module.
19+
pub use crate::response::query_result::{
20+
FirstRowError, IntoRowsResultError, MaybeFirstRowError, ResultNotRowsError, RowsError,
21+
SingleRowError,
22+
};
23+
24+
// Re-export error type from authentication module.
25+
pub use crate::authentication::AuthError;
26+
27+
// Re-export error types from scylla-cql.
28+
pub use scylla_cql::deserialize::{DeserializationError, TypeCheckError};
29+
pub use scylla_cql::frame::frame_errors::{
30+
CqlAuthChallengeParseError, CqlAuthSuccessParseError, CqlAuthenticateParseError,
31+
CqlErrorParseError, CqlEventParseError, CqlRequestSerializationError, CqlResponseParseError,
32+
CqlResultParseError, CqlSupportedParseError, FrameBodyExtensionsParseError,
33+
FrameHeaderParseError,
34+
};
35+
pub use scylla_cql::frame::request::CqlRequestKind;
36+
pub use scylla_cql::frame::response::error::{DbError, OperationType, WriteType};
37+
pub use scylla_cql::frame::response::CqlResponseKind;
38+
pub use scylla_cql::serialize::SerializationError;
3739

3840
/// Error that occurred during query execution
3941
#[derive(Error, Debug, Clone)]

0 commit comments

Comments
 (0)