capacitor-community / contacts

Contacts Plugin for Capacitor
https://capacitor-community.github.io/contacts/
125 stars 54 forks source link

bug(android): native exception are currently not caught #127

Closed robingenz closed 2 months ago

robingenz commented 2 months ago

Describe the bug

Currently, if an exception is thrown under Android, this leads to an app crash. The plugin should always catch all exceptions and forward them to the webview. There should never be a crash.

Expected behavior

Native exceptions should always been caught. Example: https://github.com/capawesome-team/capacitor-plugins/blob/0c38eaef320a14b7b08cd9d160ebe8b3119f9f1d/packages/file-picker/android/src/main/java/io/capawesome/capacitorjs/plugins/filepicker/FilePickerPlugin.java#L55