yrs/
error.rs

1use crate::ID;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum Error {
6    #[error("{0}")]
7    ReadError(#[from] crate::encoding::read::Error),
8    #[error("failed to apply update: {0}")]
9    UpdateError(#[from] UpdateError),
10    #[error("Cannot execute this operation when document garbage collection is set")]
11    Gc,
12}
13
14#[derive(Debug, Error)]
15pub enum UpdateError {
16    #[error("block parent {0} must be deleted or shared ref type. Type: {1}")]
17    InvalidParent(ID, u8),
18}