Better error handling with window on error

Asked By 40 points N/A Posted on -
qa-featured

Hello friends,

When run the java script I ended up with an error message. I am a beginner and I am in the process of learning new concepts. I got this error message, having hard time. How do I find the solution? Please help me to resolve this error and to find solutions. Your help is great. Thanks a lot.

JavaScript error: Syntax error at line 1 while

loading: expected ‘)’. got <end of file> on line 1

for http://devfiles.myopera.com/articles/8102/clumsy.js

Stop executing scripts on this page OK

SHARE
Answered By 0 points N/A #188670

Better error handling with window on error

qa-featured

This is the output effect of the "window.onerror" fucntion. "onerror" is a DOM event handler that is initiated when an error occurs during the loading of objects.

The "window.onerror" function is also an event handler. It's job is to capture the errors when there is an uncaught exception or a compile-time error. "window.onerror" is then called to give contextual information about the error.

This is just a function to decrease difficulty in debugging your script. This basically shows the type of error or message, the line number where the error occured, and the url of the file.

Login/Register to Answer

Related Questions