diff --git a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java index ee5ef1f5..043f5cb7 100644 --- a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java +++ b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java @@ -169,7 +169,12 @@ public class ScannerDataManagerStubFragment extends Fragment { } this.documentProcessor = documentProcessorFactory.create(this.documentDetail); Toast.makeText(getActivity(), "documentProcessor created", Toast.LENGTH_LONG).show(); - this.documentProcessor.init(); + try { + this.documentProcessor.init(); + } catch (Exception e) { + Toast.makeText(getActivity(), "Error occurred while initializing documentProcessor", Toast.LENGTH_LONG).show(); + Log.e("ScannerDataManagerStubFragment", "Error occurred while initializing documentProcessor", e); + } Toast.makeText(getActivity(), "documentProcessor initialized", Toast.LENGTH_LONG).show(); });