-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: move error handling code into node_errors.cc #24058
Conversation
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)
V(v8) \ | ||
V(worker) \ | ||
V(zlib) | ||
#define NODE_BUILTIN_STANDARD_MODULES(V) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this passes cpp-lint, maybe keep it with the old indent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's going to continue being a problem every time we run clang-format until someone lets it be merged. I say leave it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@refack This is done by make format-cpp
, so the next time someone touches this bit it will be reindented again - I'd prefer we just go with whatever make format-cpp
gives and forget about formatting issues, that'd be easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my preference, the it will be fixed when there's a real change to the list.
But it's just a preference, non-blocking.
Ping: can I get some reviews? I'd like to land this one first so that I can include node_errors.h and reuse the code in another patch. If anyone is afraid this is going to block #23926 I could split out the bits that that patch also tries to move, but ideally I think we should just land this since that patch is still in progress and the (copy-pasted) refactoring should've been moved into one patch so that other patches can build on top of the reusable functions instead of waiting for a patch that actually tries to alter these functions. |
IIUC #23926 still has some work to be done... |
Landed in 5850220, thanks! |
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 <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
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 <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]>
@joyeecheung would you want to backport this to |
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.
And move the following definitions (declared elsewhere than
node_errors.h) to node_errors.cc: