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

@@ -86,7 +86,7 @@ pub fn decode(bytes: &[u8], mode: u8) -> Result<DecoderRXingResult, Exceptions>
let pc = getPostCode2(bytes);
let ps2Length = getPostCode2Length(bytes) as usize;
if ps2Length > 10 {
return Err(Exceptions::FormatException(None));
return Err(Exceptions::formatEmpty());
}
// NumberFormat df = new DecimalFormat("0000000000".substring(0, ps2Length));
// postcode = df.format(pc);