暫定)エラーハンドリング

This commit is contained in:
r-ca 2024-01-09 14:09:05 +09:00
parent e8804e8f84
commit 69b60944b4
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -185,9 +185,21 @@ public class ScannerDataManagerStubFragment extends Fragment {
bitmaps[i] = results.get(i).getBitmap();
}
this.documentProcessor.addNewPagesToLast(bitmaps);
try {
this.documentProcessor.addNewPagesToLast(bitmaps);
} catch (Exception e) {
Toast.makeText(getActivity(), "Error occurred while adding pages", Toast.LENGTH_LONG).show();
Log.e("ScannerDataManagerStubFragment", "Error occurred while adding pages", e);
}
this.documentProcessor.close();
Toast.makeText(getActivity(), "pages added", Toast.LENGTH_LONG).show();
try {
this.documentProcessor.close();
} catch (Exception e) {
Toast.makeText(getActivity(), "Error occurred while closing documentProcessor", Toast.LENGTH_LONG).show();
Log.e("ScannerDataManagerStubFragment", "Error occurred while closing documentProcessor", e);
}
});
}