Using ErrorHandler class, I am able to capture the errors and send them to the server. I didn't get anything on the capturing of the warnings logged by JS runtime.
If we do the explicit logging, then it can be captured. But I want to capture the warnings, info and errors which are automatically displayed by the browser.
Also, here I am talking specifically about chrome browser.
Could anyone help me in this?
- I had tried Errorhandler class. And from ErrorHandler, I am extending the customised class which uses handle Error method.
But this is just showing the errors and not the warnings or info.
Also, I had tried to override the console.warn and console.info methods which is also of no use since I am not explicitly throwing any warnings.
Then I had used the code for Patching the zone.js. Still not able to capture the warning.
Once I will be able to capture the warning, then I will push the caught error, warning and info in an array.