X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fdatamatrix%2Fdetector%2FDetector.java;fp=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fdatamatrix%2Fdetector%2FDetector.java;h=5915865ab6f9c0515a19e47e236f183fe3174e93;hb=ac343e4ddc7af1f54c2d2634abb1be992d183a35;hp=823c62424429edfb535d3503fb0a210053b00450;hpb=112aa0eb1c6b40b46c58f9133443fa1aa20e49fb;p=zxing.git diff --git a/core/src/com/google/zxing/datamatrix/detector/Detector.java b/core/src/com/google/zxing/datamatrix/detector/Detector.java index 823c6242..5915865a 100644 --- a/core/src/com/google/zxing/datamatrix/detector/Detector.java +++ b/core/src/com/google/zxing/datamatrix/detector/Detector.java @@ -16,7 +16,7 @@ package com.google.zxing.datamatrix.detector; -import com.google.zxing.ReaderException; +import com.google.zxing.NotFoundException; import com.google.zxing.ResultPoint; import com.google.zxing.common.BitMatrix; import com.google.zxing.common.Collections; @@ -57,9 +57,9 @@ public final class Detector { *

Detects a Data Matrix Code in an image.

* * @return {@link DetectorResult} encapsulating results of detecting a QR Code - * @throws ReaderException if no Data Matrix Code can be found + * @throws NotFoundException if no Data Matrix Code can be found */ - public DetectorResult detect() throws ReaderException { + public DetectorResult detect() throws NotFoundException { ResultPoint[] cornerPoints = rectangleDetector.detect(); ResultPoint pointA = cornerPoints[0]; @@ -110,7 +110,7 @@ public final class Detector { } if (maybeTopLeft == null || bottomLeft == null || maybeBottomRight == null) { - throw ReaderException.getInstance(); + throw NotFoundException.getNotFoundInstance(); } // Bottom left is correct but top left and bottom right might be switched @@ -169,7 +169,7 @@ public final class Detector { ResultPoint topLeft, ResultPoint bottomLeft, ResultPoint bottomRight, - int dimension) throws ReaderException { + int dimension) throws NotFoundException { // We make up the top right point for now, based on the others. // TODO: we actually found a fourth corner above and figured out which of two modules