test: add useful info to error msg and refactor#18541
test: add useful info to error msg and refactor#18541chinhuang007 wants to merge 1 commit intonodejs:masterfrom
Conversation
There was a problem hiding this comment.
This will print the message on two lines and add 4 spaces at the beginning of the second one. I think it's better to use a single line.
There was a problem hiding this comment.
If a single line of code exceeds 80 chars, you can keep it as a single line of output like this:
'Domains stack should be empty in uncaughtException handler' +
`but the value of process.domain is ${JSON.stringify(process.domain)}`);There was a problem hiding this comment.
Alternatively, you can simply remove the message (3rd) argument entirely and the default behavior will print the value of process.domain. If you think the contents of the message are valuable, you can put them as a comment right above the call to assert.strictEqual().
5c2f6b7 to
94166e9
Compare
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner.
94166e9 to
6d1103a
Compare
|
The CI failure yesterday doesn't seem related to my change. Just rebased. Can someone start a new CI please? |
|
@chinhuang007 don't worry about those. Our CI often either has some infrastructure failures and or test flakes. |
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: nodejs#18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
|
Landed in c3ff899 🎉 @chinhuang007 congratulations on your first commit to Node.js! |
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: nodejs#18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the uncaughtException event listener and the beforeExit event listener. Refactor code such as using template literals, and also make sure uncaughtException listner is detached after firing once to avoid endless loop in case of exception throw in the beforeExit event listner. PR-URL: #18541 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Add useful info about process.domain to error meesages in the
uncaughtException event listener and the beforeExit event listener.
Refactor code such as using template literals, and also make sure
uncaughtException listner is detached after firing once to avoid
endless loop in case of exception throw in the beforeExit event
listner.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test