float moduleSize = calculateModuleSize(topLeft, topRight, bottomLeft);
if (moduleSize < 1.0f) {
- throw new ReaderException("Module size too small");
+ throw ReaderException.getInstance();
}
int dimension = computeDimension(topLeft, topRight, bottomLeft, moduleSize);
Version provisionalVersion = Version.getProvisionalVersionForDimension(dimension);
}
}
if (alignmentPattern == null) {
- throw new ReaderException("Could not find alignment pattern");
+ throw ReaderException.getInstance();
}
}
dimension--;
break;
case 3:
- throw new ReaderException("Bad dimension: " + dimension);
+ throw ReaderException.getInstance();
}
return dimension;
}
int alignmentAreaLeftX = Math.max(0, estAlignmentX - allowance);
int alignmentAreaRightX = Math.min(image.getWidth() - 1, estAlignmentX + allowance);
if (alignmentAreaRightX - alignmentAreaLeftX < overallEstModuleSize * 3) {
- throw new ReaderException("Alignment pattern is too small to search");
+ throw ReaderException.getInstance();
}
int alignmentAreaTopY = Math.max(0, estAlignmentY - allowance);