risingwave_storage/
error.rs1use risingwave_common::util::value_encoding::error::ValueEncodingError;
16use thiserror::Error;
17
18use crate::hummock::HummockError;
19use crate::mem_table::MemTableError;
20
21#[derive(Error, thiserror_ext::ReportDebug, thiserror_ext::Box)]
22#[thiserror_ext(newtype(name = StorageError, backtrace))]
23pub enum ErrorKind {
24 #[error("Hummock error: {0}")]
25 Hummock(
26 #[backtrace]
27 #[from]
28 HummockError,
29 ),
30
31 #[error("Deserialize row error: {0}")]
32 DeserializeRow(
33 #[from]
34 #[backtrace]
35 ValueEncodingError,
36 ),
37
38 #[error("Serialize/deserialize error: {0}")]
39 SerdeError(
40 #[from]
41 #[backtrace]
42 memcomparable::Error,
43 ),
44
45 #[error("Sled error: {0}")]
46 Sled(
47 #[backtrace]
48 #[from]
49 sled::Error,
50 ),
51
52 #[error("MemTable error: {0}")]
53 MemTable(
54 #[backtrace]
55 #[from]
56 Box<MemTableError>,
57 ),
58}
59
60pub type StorageResult<T> = std::result::Result<T, StorageError>;