reconcile_text/operation_transformation/
diff_error.rs1use thiserror::Error;
2
3#[derive(Error, Debug, Clone, PartialEq)]
5pub enum DiffError {
6 #[error(
8 "Invalid diff: attempting to access {requested} characters starting at position \
9 {position}, but original text only has {available} characters remaining"
10 )]
11 LengthExceedsOriginal {
12 position: usize,
14 requested: usize,
16 available: usize,
18 },
19
20 #[error("Integer overflow: value {value} cannot be represented as i64")]
22 IntegerOverflow {
23 value: usize,
25 },
26}