I want to handle angular errors and exceptions with chrome extension
Here my manifest.json
- {
-
- "background" : { "scripts" : ["background.js"] }
- }
I have tried in two ways but it doesn't alert errors .
Here my background.js
> Method 1
- window.onerror = function intercept (message, file, line, col, error) {
- alert("Error occurred: " + message + " in file " + file + " at line " + line);
- return false;
- };
> Method 2
- window.addEventListener('error', function(e) {
- alert('handled uncaught error : ' , e); });
I know that i can implement ErrorHandler class but i want to do this suff with chrome extension
Please how to achieve that