From 025be82dcb1f288c270d9db2cf17ed55ffd73964 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Fri, 19 Aug 2022 17:34:02 -0500 Subject: [PATCH] a few changes to lib --- src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 5dda9b3..b9c41b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -924,9 +924,12 @@ impl MultiFormatReader { // Calling all readers again with inverted image image.get_black_matrix().flip(); for reader in self.readers { + todo!("thread interupted"); + /* if Thread::current_thread()::is_interrupted() { return Err( NotFoundException::get_not_found_instance()); } + */ let tryResult1 = 0; return reader.decode(image, &self.hints); @@ -1634,7 +1637,7 @@ impl RGBLuminanceSource { fn new( pixels: &Vec, data_width: i32, data_height: i32, left: i32, top: i32, width: i32, height: i32) -> RGBLuminanceSource { super(width, height); if left + width > data_width || top + height > data_height { - throw IllegalArgumentException::new("Crop rectangle does not fit within image data."); + return Err( IllegalArgumentException::new("Crop rectangle does not fit within image data.")); } let .luminances = pixels; let .dataWidth = data_width;