diff options
author | James M Snell <jasnell@gmail.com> | 2017-10-27 16:25:14 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-11-02 11:58:38 -0700 |
commit | c3dc0e0d75cc5a03de154f3586e1062df1e719e4 (patch) | |
tree | 8cf83f993f44df1f9cde0b59f87db81558bed6b0 /src/env.h | |
parent | f1f0eb25951a33cd97661aee44a9b43bc6eb6d27 (diff) | |
download | android-node-v8-c3dc0e0d75cc5a03de154f3586e1062df1e719e4.tar.gz android-node-v8-c3dc0e0d75cc5a03de154f3586e1062df1e719e4.tar.bz2 android-node-v8-c3dc0e0d75cc5a03de154f3586e1062df1e719e4.zip |
src: add CollectExceptionInfo & errors.SystemError
Preparing for the migration of existing UVException and ErrnoExceptions
from the native layer, add new `errors.SystemError` to internal/errors
and new `env->CollectExceptionInfo()` / `env->CollectUVExceptionInfo()`
methods.
PR-URL: https://github.com/nodejs/node/pull/16567
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -617,6 +617,19 @@ class Environment { inline performance::performance_state* performance_state(); inline std::map<std::string, uint64_t>* performance_marks(); + void CollectExceptionInfo(v8::Local<v8::Value> context, + int errorno, + const char* syscall = nullptr, + const char* message = nullptr, + const char* path = nullptr); + + void CollectUVExceptionInfo(v8::Local<v8::Value> context, + int errorno, + const char* syscall = nullptr, + const char* message = nullptr, + const char* path = nullptr, + const char* dest = nullptr); + inline void ThrowError(const char* errmsg); inline void ThrowTypeError(const char* errmsg); inline void ThrowRangeError(const char* errmsg); |