Open SantoshSah opened 7 years ago
We have implemented two things in error handler 1) ErrorHandler angular class from Angular2, which intercepts any uncaught errors in system in dump it to console.
2) IonicErrorHandler class from Ionic2, which intercepts the default Console error handling and displays runtime errors as an overlay when using Ionic's Dev Build Server.
Our app is being crashed and errors are being shown on UI due to IonicErrorHandler. If you want to run our apps event hough there are error and want to log using aws only by below code AwsClient.logEvent(err);
,
please do not inherits CustomErrorHanlder class from CustomErrorHandler.
Please let me know if you do not expected behaviour of IonicErrorHandler. I will remove and will push change quickly.
Integrating this CL is causing the app to crash. ion-dev.js?v=0.0.47:156 EXCEPTION: Uncaught (in promise): false(anonymous function) @ ion-dev.js?v=0.0.47:156ErrorHandler.handleError @ error_handler.js:47IonicErrorHandler.handleError @ ionic-error-handler.js:56CustomErrorHandler.handleError @ custom.error.handler.ts:12next @ application_ref.js:272schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74NgZone.triggerError @ ng_zone.js:278onHandleError @ ng_zone.js:257t.handleError @ polyfills.js:3e.runGuarded @ polyfills.js:3r @ polyfills.js:3i @ polyfills.js:3invoke @ polyfills.js:3 ion-dev.js?v=0.0.47:156 ORIGINAL STACKTRACE:(anonymous function) @ ion-dev.js?v=0.0.47:156ErrorHandler.handleError @ error_handler.js:52IonicErrorHandler.handleError @ ionic-error-handler.js:56CustomErrorHandler.handleError @ custom.error.handler.ts:12next @ application_ref.js:272schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74NgZone.triggerError @ ng_zone.js:278onHandleError @ ng_zone.js:257t.handleError @ polyfills.js:3e.runGuarded @ polyfills.js:3r @ polyfills.js:3i @ polyfills.js:3invoke @ polyfills.js:3 ion-dev.js?v=0.0.47:156 Error: Uncaught (in promise): false at s (polyfills.js:3) at s (polyfills.js:3) at polyfills.js:3 at t.invokeTask (polyfills.js:3) at Object.onInvokeTask (ng_zone.js:227) at t.invokeTask (polyfills.js:3) at e.runTask (polyfills.js:3) at i (polyfills.js:3) at HTMLElement.invoke (polyfills.js:3)
This error has been showing in the console when you start a new survey, but adding this error handler is causing the app to fail entirely after dumping the error to console. Removing the error handler from AppModule reverts back to the old behavior.