From c4b63da6619b9aa72c63604790af7fbc22bde3ed Mon Sep 17 00:00:00 2001 From: yorkie Date: Wed, 4 Nov 2015 16:17:21 +0800 Subject: [PATCH 1/2] 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`. --- doc/api/errors.markdown | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index 505241fc89a487..f52715169a9222 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -243,8 +243,9 @@ by other contexts. 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 -`Error`, all exceptions thrown by Node.js or the JavaScript runtime *will* be instances of Error. +as the target of a `throw` statement. While it is not required that these values are instances of +`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 down the process. These are usually failed `assert()` checks or `abort()` calls in the C++ layer. From 84a615a9fdbce540966fb5e57740763dbcc63de1 Mon Sep 17 00:00:00 2001 From: Yorkie Liu Date: Fri, 27 Nov 2015 02:16:49 +0800 Subject: [PATCH 2/2] fix nit --- doc/api/errors.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/errors.markdown b/doc/api/errors.markdown index f52715169a9222..970092064aa51a 100644 --- a/doc/api/errors.markdown +++ b/doc/api/errors.markdown @@ -242,7 +242,7 @@ by other contexts. -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 are instances of `Error` or classes which inherit from `Error`, all exceptions thrown by Node.js or the JavaScript runtime *will* be instances of Error.