Download this file
| 1 | use crate::ID; |
| 2 | use thiserror::Error; |
| 3 | |
| 4 | #[derive(Debug, Error)] |
| 5 | pub 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)] |
| 15 | pub enum UpdateError { |
| 16 | #[error("block parent {0} must be deleted or shared ref type. Type: {1}")] |
| 17 | InvalidParent(ID, u8), |
| 18 | } |
| 19 | |