From 6b680964606114ab4d2346f5b923054767334cd4 Mon Sep 17 00:00:00 2001 From: Cyril Makankov Date: Mon, 6 Jul 2015 15:24:31 +0300 Subject: [PATCH] Exclude catch block from coveralls counting --- TesseractOCR/G8Tesseract.mm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/TesseractOCR/G8Tesseract.mm b/TesseractOCR/G8Tesseract.mm index 184c106e..d4e3302a 100644 --- a/TesseractOCR/G8Tesseract.mm +++ b/TesseractOCR/G8Tesseract.mm @@ -403,9 +403,11 @@ - (void)setImage:(UIImage *)image @try { _tesseract->SetImage(pix); } - @catch (NSException *exception) { // LCOV_EXCL_LINE - NSLog(@"ERROR: Can't set image: %@", exception); // LCOV_EXCL_LINE + //LCOV_EXCL_START + @catch (NSException *exception) { + NSLog(@"ERROR: Can't set image: %@", exception); } + //LCOV_EXCL_STOP pixDestroy(&pix); _image = image; @@ -741,9 +743,11 @@ - (BOOL)recognize returnCode = _tesseract->Recognize(_monitor); self.recognized = YES; } - @catch (NSException *exception) { // LCOV_EXCL_LINE - NSLog(@"Exception was raised while recognizing: %@", exception); // LCOV_EXCL_LINE + //LCOV_EXCL_START + @catch (NSException *exception) { + NSLog(@"Exception was raised while recognizing: %@", exception); } + //LCOV_EXCL_STOP return returnCode == 0 && self.recognized; }