summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGreg Alexander <gregory.l.alexander@gmail.com>2017-08-09 22:26:03 -0500
committerRuben Bridgewater <ruben@bridgewater.de>2017-09-28 02:22:29 -0300
commitccfcd8873cf4966380322f89e34ce47441868c9d (patch)
tree74f0c3d8fbcf97847275e4c45173480bdc0268ae /doc
parent64e97b2c26f2ccd13bcb420b36f1285d4720845e (diff)
downloadnode-new-ccfcd8873cf4966380322f89e34ce47441868c9d.tar.gz
crypto: better crypto error messages
Add openSSL error stack to the exception object thrown from crypto. The new exception property is only added to the object if the error stack has not cleared out prior to calling ThrowCryptoError. PR-URL: https://github.com/nodejs/node/pull/15518 Refs: https://github.com/nodejs/node/issues/5444 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/errors.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md
index ba81f2f75e..dc530c7589 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -192,6 +192,10 @@ circumstance of why the error occurred. `Error` objects capture a "stack trace"
detailing the point in the code at which the `Error` was instantiated, and may
provide a text description of the error.
+For crypto only, `Error` objects will include the OpenSSL error stack in a
+separate property called `opensslErrorStack` if it is available when the error
+is thrown.
+
All errors generated by Node.js, including all System and JavaScript errors,
will either be instances of, or inherit from, the `Error` class.