This repository was archived by the owner on Apr 22, 2023. It is now read-only.
domain: move error handling directly into instance#6096
Merged
trevnorris merged 1 commit intonodejs:masterfrom Aug 23, 2013
trevnorris:move-error-handling-to-domain-module
Merged
domain: move error handling directly into instance#6096trevnorris merged 1 commit intonodejs:masterfrom trevnorris:move-error-handling-to-domain-module
trevnorris merged 1 commit intonodejs:masterfrom
trevnorris:move-error-handling-to-domain-module
Conversation
Author
|
@isaacs just need a quick approval. This is going to add some new functionality that we're going to pretend doesn't exist. For example, you can do the following: process.domain = {
_errorHandler: function errorHandler(er) {
return true;
},
enter: function enter() { },
exit: function exit() { }
}
setTimeout(function() {
throw new Error('freak yeah!');
});And... it'll catch all errors. Basically another This is a first step at working towards #6011, and since it can be done separate I'd like to get it in now to lighten the review load necessary from the other. |
Member
|
LGTM in the sense that I don't see anything obviously wrong. Isaac should probably sign off on it as well though. |
Author
|
I'm going to infer @isaacs is good with this. From IRC: |
Instead of doing all the domain handling in core, allow the domain to set an error handler that'll take care of it all. This way the domain error handling can be abstracted enough for any user to use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of doing all the domain handling in core, allow the domain to
set an error handler that'll take care of it all. This way the domain
error handling can be abstracted enough for any user to use it.