Skip to content

Commit

Permalink
Clearer error messages for limit errors (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia authored Jan 13, 2024
1 parent d55be71 commit e47ab52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ impl Error for DecodingError {
impl fmt::Display for LimitError {
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
match self.kind {
LimitErrorKind::InsufficientMemory => write!(fmt, "Insufficient memory"),
LimitErrorKind::DimensionError => write!(fmt, "Image is too large"),
LimitErrorKind::InsufficientMemory => write!(fmt, "Memory limit exceeded"),
LimitErrorKind::DimensionError => write!(fmt, "Image size exceeds limit"),
LimitErrorKind::Unsupported { .. } => {
write!(fmt, "The following strict limits are specified but not supported by the opertation: ")?;
Ok(())
Expand Down

0 comments on commit e47ab52

Please sign in to comment.