Search code examples
javascriptfirebugcustom-error-handling

javascript how to find an error in a script


I know this is a little to less to get an answer on what the problem is so what I ask is how to debug it.

I get the following error (the image below). No line, script or anything specified. Also except the ones in jQuery and raphaeljs libraries I don't have any custom error handler defined.

enter image description here

Got any ideas on how to debug this?

(The main script for example has around 3k lines and since I don't know where the error occurs I don't know witch part of it to post. I need only a way to find that.)

Thank you for your time.


Solution

  • This happens when the script throws a string, rather than a proper exception, like:

    throw 'Error in protected function: )55';
    

    See this other SO question for possible solutions:

    How can I get a Javascript stack trace when I throw an exception?