Skip to content

Commit cb7d9f9

Browse files
joyeecheungtargos
authored andcommitted
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: #24058 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent 6b697d4 commit cb7d9f9

12 files changed

+516
-505
lines changed

node.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@
345345
'src/node_domain.cc',
346346
'src/node_encoding.cc',
347347
'src/node_errors.h',
348+
'src/node_errors.cc',
348349
'src/node_file.cc',
349350
'src/node_http2.cc',
350351
'src/node_http_parser.cc',

src/async_wrap.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121

2222
#include "async_wrap-inl.h"
2323
#include "env-inl.h"
24+
#include "node_errors.h"
2425
#include "node_internals.h"
25-
#include "util-inl.h"
2626
#include "tracing/traced_value.h"
27+
#include "util-inl.h"
2728

2829
#include "v8.h"
2930
#include "v8-profiler.h"

src/inspector_agent.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#include "inspector_agent.h"
22

3-
#include "inspector_io.h"
43
#include "inspector/main_thread_interface.h"
54
#include "inspector/node_string.h"
65
#include "inspector/tracing_agent.h"
76
#include "inspector/worker_agent.h"
87
#include "inspector/worker_inspector.h"
8+
#include "inspector_io.h"
99
#include "node/inspector/protocol/Protocol.h"
10+
#include "node_errors.h"
1011
#include "node_internals.h"
1112
#include "node_url.h"
1213
#include "v8-inspector.h"

0 commit comments

Comments
 (0)