-
Chris Scott authored
Implementing exception handling when running callbacks executed within background threads. Since these callbacks are provided a taskId which must be passed back to the native code when a Javascript callback is complete, a Javascript error in application-code can cause cause the bgGeo.finish(taskId) method to fail being called, resulting in the OS killing the app for poor background behaviour (espcially iOS). These errors can be difficult to debug, so I've wrapped callbacks provided with a taskId in try/catch blocks. If your application code throws an excpetion, the plugin catches it and finishes the task for you. In addition, the exception handler signals to the native-code that a javascript exception occurred, providing it with some error details. This allows the native code to show an alert box (in debug-mode) and play an annoying alert-sound so that developers know that something went wrong
a4c45e4e
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| libs | ||
| CDVBackgroundGeolocation.java |