use std::{error, result};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("紧缩目标地址 {until_address:#x} 超出只读区边界 {read_only_address:#x}")]
UntilAddressOutOfRange {
until_address: u64,
read_only_address: u64,
},
#[error(transparent)]
Epoch(#[from] wepoch::Error),
#[error(transparent)]
Hlog(#[from] whlog::Error),
#[error(transparent)]
Record(#[from] wrecord::Error),
#[error(transparent)]
Value(#[from] wval::Error),
#[error("紧缩路径不可达的宿主引擎错误")]
Host(Box<dyn error::Error + Send + Sync>),
}
pub type Result<T> = result::Result<T, Error>;