projects
/
zxing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
"Split" ReaderException into subclasses to enable more useful error reporting
[zxing.git]
/
core
/
src
/
com
/
google
/
zxing
/
datamatrix
/
detector
/
Detector.java
diff --git
a/core/src/com/google/zxing/datamatrix/detector/Detector.java
b/core/src/com/google/zxing/datamatrix/detector/Detector.java
index
823c624
..
5915865
100644
(file)
--- 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;
package com.google.zxing.datamatrix.detector;
-import com.google.zxing.
Reader
Exception;
+import com.google.zxing.
NotFound
Exception;
import com.google.zxing.ResultPoint;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.common.Collections;
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 {
* <p>Detects a Data Matrix Code in an image.</p>
*
* @return {@link DetectorResult} encapsulating results of detecting a QR Code
* <p>Detects a Data Matrix Code in an image.</p>
*
* @return {@link DetectorResult} encapsulating results of detecting a QR Code
- * @throws
Reader
Exception if no Data Matrix Code can be found
+ * @throws
NotFound
Exception if no Data Matrix Code can be found
*/
*/
- public DetectorResult detect() throws
Reader
Exception {
+ public DetectorResult detect() throws
NotFound
Exception {
ResultPoint[] cornerPoints = rectangleDetector.detect();
ResultPoint pointA = cornerPoints[0];
ResultPoint[] cornerPoints = rectangleDetector.detect();
ResultPoint pointA = cornerPoints[0];
@@
-110,7
+110,7
@@
public final class Detector {
}
if (maybeTopLeft == null || bottomLeft == null || maybeBottomRight == null) {
}
if (maybeTopLeft == null || bottomLeft == null || maybeBottomRight == null) {
- throw
ReaderException.get
Instance();
+ throw
NotFoundException.getNotFound
Instance();
}
// Bottom left is correct but top left and bottom right might be switched
}
// 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,
ResultPoint topLeft,
ResultPoint bottomLeft,
ResultPoint bottomRight,
- int dimension) throws
Reader
Exception {
+ int dimension) throws
NotFound
Exception {
// 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
// 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