| Error | NN 6 IE 5(Win) ECMA 3 |
|
| |
|
Browsers that implement
try/catch exception handling
automatically create an instance of the Error
object whenever an error occurs during script processing. You can
also create an Error object instance that you
explicitly throw. The catch portion of the
try/catch construction receives
the Error object instance as a parameter, which
scripts can examine to learn the details of the error, as exposed by
the object's properties.
|
| |
| Properties |
| |
| constructor | description | fileName | lineNumber |
| message | name | number | prototype |
|
| |
| Methods |
| |
|
|
| |
| Creating an Error Object |
| |
var myError = new Error("errorMessage");
|