Jiby Jose
Jiby Jose

Reputation: 3845

Chrome find out which external script caused "Script Error."

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.

Upvotes: 4

Views: 806

Answers (1)

sanyam jain
sanyam jain

Reputation: 135

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.

Upvotes: 1

Related Questions