js capture all errors

Solutions on MaxInterview for js capture all errors by the best coders in the world

showing results for - "js capture all errors"
Lev
06 Jan 2019
1<html>
2   <head>
3      <script>
4         <!--
5            window.onerror = function (msg, url, line) {
6               alert("Message : " + msg );
7               alert("url : " + url );
8               alert("Line number : " + line );
9            }
10         //-->
11      </script>
12   </head>
13   <body>
14      <p>Click the following to see the result:</p>
15
16      <form>
17         <input type = "button" value = "Click Me" onclick = "myFunc();" />
18      </form>
19   </body>
20</html>