Skip to content

Commit

Permalink
Handle ZXingError class in iOS wrapper (#877)
Browse files Browse the repository at this point in the history
ios: Handle all errors by catching exceptions of any type (save guard against crash)
  • Loading branch information
GUIEEN authored Dec 25, 2024
1 parent 11d12b5 commit 0dfa36b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wrappers/ios/Sources/Wrapper/Reader/ZXIBarcodeReader.mm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ - (instancetype)initWithOptions:(ZXIReaderOptions*)options{
} catch(std::exception &e) {
SetNSError(error, ZXIReaderError, e.what());
return nil;
} catch (...) {
SetNSError(error, ZXIReaderError, "An unknown error occurred");
return nil;
}
}

Expand Down

0 comments on commit 0dfa36b

Please sign in to comment.