use thiserror::Error;
#[derive(Error, Debug, Clone, PartialEq)]
pub enum DiffError {
#[error(
"Invalid diff: attempting to access {requested} characters starting at position \
{position}, but original text only has {available} characters remaining"
)]
LengthExceedsOriginal {
position: usize,
requested: usize,
available: usize,
},
#[error("Integer overflow: value {value} cannot be represented as i64")]
IntegerOverflow {
value: usize,
},
}