aboutsummaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-10-27 16:25:14 -0700
committerJames M Snell <jasnell@gmail.com>2017-11-02 11:58:38 -0700
commitc3dc0e0d75cc5a03de154f3586e1062df1e719e4 (patch)
tree8cf83f993f44df1f9cde0b59f87db81558bed6b0 /src/env.h
parentf1f0eb25951a33cd97661aee44a9b43bc6eb6d27 (diff)
downloadandroid-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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h
index c8bb168df4..787cc7eb19 100644
--- a/src/env.h
+++ b/src/env.h
@@ -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);