Browse Source

doc: fix the exception description

A value shouldn't be described as doing inherit from some class, more
strictly, the value is an instance of the class `Error`.

PR-URL: https://github.com/nodejs/node/pull/3658
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
v5.x
yorkie 9 years ago
committed by Rod Vagg
parent
commit
aaeced915e
  1. 7
      doc/api/errors.markdown

7
doc/api/errors.markdown

@ -357,9 +357,10 @@ of argument validation.
<!--type=misc--> <!--type=misc-->
A JavaScript "exception" is a value that is thrown as a result of an invalid operation or A JavaScript exception is a value that is thrown as a result of an invalid operation or
as the target of a `throw` statement. While it is not required that these values inherit from as the target of a `throw` statement. While it is not required that these values are instances of
`Error`, all exceptions thrown by Node.js or the JavaScript runtime *will* be instances of Error. `Error` or classes which inherit from `Error`, all exceptions thrown by Node.js or the JavaScript
runtime *will* be instances of Error.
Some exceptions are *unrecoverable* at the JavaScript layer. These exceptions will always bring Some exceptions are *unrecoverable* at the JavaScript layer. These exceptions will always bring
down the process. These are usually failed `assert()` checks or `abort()` calls in the C++ layer. down the process. These are usually failed `assert()` checks or `abort()` calls in the C++ layer.

Loading…
Cancel
Save