refactor to use exception helper factories

This commit is contained in:
Vukašin Stepanović
2023-02-15 10:46:13 +00:00
parent 3e27279dc8
commit 722ce78fd0
132 changed files with 966 additions and 1132 deletions

View File

@@ -78,8 +78,7 @@ pub fn detect_with_hints(
for rotation in ROTATIONS {
// for (int rotation : ROTATIONS) {
let bitMatrix = applyRotation(originalMatrix, rotation)?;
let barcodeCoordinates =
detect(multiple, &bitMatrix).ok_or(Exceptions::NotFoundException(None))?;
let barcodeCoordinates = detect(multiple, &bitMatrix).ok_or(Exceptions::notFoundEmpty())?;
if !barcodeCoordinates.is_empty() {
return Ok(PDF417DetectorRXingResult::with_rotation(
bitMatrix.into_owned(),