Skip to content

Commit 44507d6

Browse files
committed
update replication error types
1 parent eec79f4 commit 44507d6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

  • libsql-wal/src/replication

libsql-wal/src/replication/mod.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
1+
use std::io;
2+
13
pub mod injector;
24
pub mod replicator;
5+
pub mod storage;
6+
7+
pub(crate) type Result<T, E = Error> = std::result::Result<T, E>;
8+
9+
type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;
10+
11+
#[derive(Debug, thiserror::Error)]
12+
pub enum Error {
13+
#[error("io error {0}")]
14+
IO(#[from] io::Error),
15+
#[error("error fetching from storage: {0}")]
16+
Storage(#[from] super::storage::Error),
17+
#[error("error fetching from current segment: {0}")]
18+
CurrentSegment(BoxError),
19+
#[error("error fetching from sealed segment list: {0}")]
20+
SealedSegment(BoxError),
21+
}

0 commit comments

Comments
 (0)