about summary refs log tree commit diff
path: root/src/reader
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/reader/mod.rs b/src/reader/mod.rs
index 958eff2..1b52874 100644
--- a/src/reader/mod.rs
+++ b/src/reader/mod.rs
@@ -181,6 +181,7 @@ pub enum DecodingError {
     IoError(std::io::Error),
     UnknownVersionString,
     UnexpectedEof,
+    ColorIndexOutOfBounds,
 }
 
 impl Error for DecodingError {}
@@ -194,6 +195,12 @@ impl fmt::Display for DecodingError {
             DecodingError::UnexpectedEof => {
                 write!(f, "Found the end of the data at a weird spot")
             }
+            DecodingError::ColorIndexOutOfBounds => {
+                write!(
+                    f,
+                    "The image contained an index not found in the color table"
+                )
+            }
         }
     }
 }