This page documents the use of the Error object itself and its use as a constructor function. Class: TypeError# A subclass of Error that indicates that a provided argument is not an allowable type. If you are using any other browsers, please check the developer documentation for your browser. You can use an onerror method, as shown below, to display an error message in case there is any problem in loading an image. his comment is here
doesNotExist; // throws ReferenceError, doesNotExist is not a variable in this program. The console will provide you with the error type, the location of the error and the line number The image above shows the error to be in jquery.js on line 2. Firefox 1.
Here is the try...catch...finally block syntax −