Closed raphaelboukara closed 8 months ago
I don't rethrow: it's runtime behavior in emscripten https://github.com/emscripten-core/emscripten/blob/b1a78891c216c98d90057a358731424ab609f22c/src/shell.js#L190 by default. This seems bit interesting since emscripten sets global handler to any rejection, I may try to see and change behavior but can't promise when / or if I'll do this. My main usecase was using browser env, which this didn't affect.
Hi @kwonoj
I see that that catching the rejection is controlled via NODEJS_CATCH_REJECTION
. Can it be changed to have a default of false when using this package or at least add a config that delegates the control over this to the consumers of cld3-asm?
Yes, I don't have strong opinions on this. Unfortunately I do not have enought time to check, if someone can come up with PR I can accept those.
@kwonoj Here's a PR: https://github.com/kwonoj/docker-cld3-wasm/pull/36
Hi, First of all great thanks for this amazing repos.
TL;DR
When using
cld3-asm
in a node service, on each unhandled rejection, my service will shut down without send anybeforeExit
orexit
orSIGINT
orSIGTERM
event so I can handle those cases properly.How to reproduce?
Open terminal:
Launch the service:
Output:
And my service died without telling anyone.
Is there a way to change this behavior? Maybe I missed some config. Is it mandatory for you to re-throw the error you catch via the
unhandledRejection
event?