"Split" ReaderException into subclasses to enable more useful error reporting
[zxing.git] / core / src / com / google / zxing / qrcode / decoder / Version.java
index 823bf2b..497a63f 100755 (executable)
@@ -16,7 +16,7 @@
 \r
 package com.google.zxing.qrcode.decoder;\r
 \r
-import com.google.zxing.ReaderException;\r
+import com.google.zxing.FormatException;\r
 import com.google.zxing.common.BitMatrix;\r
 \r
 /**\r
@@ -91,16 +91,16 @@ public final class Version {
    *\r
    * @param dimension dimension in modules\r
    * @return {@link Version} for a QR Code of that dimension\r
-   * @throws ReaderException if dimension is not 1 mod 4\r
+   * @throws FormatException if dimension is not 1 mod 4\r
    */\r
-  public static Version getProvisionalVersionForDimension(int dimension) throws ReaderException {\r
+  public static Version getProvisionalVersionForDimension(int dimension) throws FormatException {\r
     if (dimension % 4 != 1) {\r
-      throw ReaderException.getInstance();\r
+      throw FormatException.getFormatInstance();\r
     }\r
     try {\r
       return getVersionForNumber((dimension - 17) >> 2);\r
     } catch (IllegalArgumentException iae) {\r
-      throw ReaderException.getInstance();\r
+      throw FormatException.getFormatInstance();\r
     }\r
   }\r
 \r