4

Hey there is this "Script Error" messsage thrown on window.onerror without any details when an error occurs in scripts included from external domain.

However even if we cant know the Error details would it be still possible to know which script file threw the error.

I am logging errors from window.onerror, and if its possible to know in which script file the "Script Error" occurred it would be easy to decide whether it can be ignored.

This is the a stack overflow thread that talks about this kind of error, but i cant find anywhere a way to find in which file error occurred

"Script Error"

Thanks for help in advance.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
Jiby Jose
  • 3,745
  • 4
  • 24
  • 32
  • Here's an explanation and a workaround: http://stackoverflow.com/questions/5913978/cryptic-script-error-reported-in-javascript-in-chrome-and-firefox/7778424#7778424 – philfreo Aug 01 '13 at 17:27

1 Answers1

1

Do inspect element and check console tab. If error is mentioned there than on right side of the error ,script producing error will be mentioned.

sanyam jain
  • 135
  • 4
  • 13
  • 1
    I am logging errrors from window.onerror to log the errors users is having in a live production site.I am trying to get to know the source of error when its a cross domain error and inside window.onerror handler,not inside console in development environment – Jiby Jose Jul 19 '13 at 05:51