From 9b616f11d6847e2f9b13b28b3b8f57c5331ef957 Mon Sep 17 00:00:00 2001 From: flyashi Date: Tue, 27 Jul 2010 23:02:28 +0000 Subject: [PATCH] C++: ITFReader.cpp was throwing wrong exception ITFReader.cpp:75 was catching and re-throwing Exception instead of ReaderException, causing scanning to terminate prematurely in some cases (i.e. core/test/data/blackbox/ean13-1/23.JPG). The calling function, MultiFormatOneDReader::doDecode, is only catching ReaderException's. An Exception would be passed all the way up to the caller, even if scanning hasn't finished yet for other decoders for other rows. git-svn-id: http://zxing.googlecode.com/svn/trunk@1493 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- cpp/core/src/zxing/oned/ITFReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/core/src/zxing/oned/ITFReader.cpp b/cpp/core/src/zxing/oned/ITFReader.cpp index 44643269..95e7a1cc 100644 --- a/cpp/core/src/zxing/oned/ITFReader.cpp +++ b/cpp/core/src/zxing/oned/ITFReader.cpp @@ -72,7 +72,7 @@ namespace zxing { int* endRange; try { endRange = decodeEnd(row); - } catch (Exception e) { + } catch (ReaderException e) { delete [] startRange; throw e; } -- 2.20.1