"Split" ReaderException into subclasses to enable more useful error reporting
[zxing.git] / core / src / com / google / zxing / pdf417 / decoder / DecodedBitStreamParser.java
index a8cf592..0638843 100644 (file)
@@ -16,7 +16,7 @@
 \r
 package com.google.zxing.pdf417.decoder;\r
 \r
-import com.google.zxing.ReaderException;\r
+import com.google.zxing.FormatException;\r
 import com.google.zxing.common.DecoderResult;\r
 \r
 /**\r
@@ -81,7 +81,7 @@ final class DecodedBitStreamParser {
   private DecodedBitStreamParser() {\r
   }\r
 \r
-  static DecoderResult decode(int[] codewords) throws ReaderException {\r
+  static DecoderResult decode(int[] codewords) throws FormatException {\r
     StringBuffer result = new StringBuffer(100);\r
     // Get compaction mode\r
     int codeIndex = 1;\r
@@ -120,7 +120,7 @@ final class DecodedBitStreamParser {
       if (codeIndex < codewords.length) {\r
         code = codewords[codeIndex++];\r
       } else {\r
-        throw ReaderException.getInstance();\r
+        throw FormatException.getFormatInstance();\r
       }\r
     }\r
     return new DecoderResult(null, result.toString(), null, null);\r