diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-11-03 17:45:40 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-11-06 15:58:40 +0300 |
commit | 5850220229cdd8b62f6d5022779af7c232231d64 (patch) | |
tree | 7dbb9c7d94be088bebf535ec41ed4a8096af847e /src/node_api.cc | |
parent | 7b1297d856dbd9af85c18478301b234caebf04e4 (diff) |
src: move error handling code into node_errors.cc
Move the following code into a new node_errors.cc file and
declare them in node_errors.h for clarity and make it possible
to include them with node_errors.h.
- AppendExceptionLine()
- DecorateErrorStack()
- FatalError()
- OnFatalError()
- PrintErrorString()
- FatalException()
- ReportException()
- FatalTryCatch
And move the following definitions (declared elsewhere than
node_errors.h) to node_errors.cc:
- Abort() (in util.h)
- Assert() (in util.h)
PR-URL: https://github.com/nodejs/node/pull/24058
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'src/node_api.cc')
-rw-r--r-- | src/node_api.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_api.cc b/src/node_api.cc index 1f7b1405539..c023920da41 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -6,9 +6,10 @@ #include <cmath> #include <vector> #define NAPI_EXPERIMENTAL +#include "env.h" #include "node_api.h" +#include "node_errors.h" #include "node_internals.h" -#include "env.h" static napi_status napi_set_last_error(napi_env env, napi_status error_code, |