CB-9366 Log error.stack ...
as it helps with diagnosing the source of the error
JavaScript fixed by @brodybits (Christopher J. Brody)
Fixes #118
Co-authored-by: Nikhil Khandelwal <nikhilkh@microsoft.com>
Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
diff --git a/src/cordova.js b/src/cordova.js
index 6297c4e..09d3451 100644
--- a/src/cordova.js
+++ b/src/cordova.js
@@ -227,6 +227,7 @@
} catch (err) {
var msg = 'Error in ' + (isSuccess ? 'Success' : 'Error') + ' callbackId: ' + callbackId + ' : ' + err;
console && console.log && console.log(msg);
+ console && console.log && err.stack && console.log(err.stack);
cordova.fireWindowEvent('cordovacallbackerror', { 'message': msg });
throw err;
}