Node.js · Senior · Question 49 of 75

Why is uncaughtException + 'log and continue' a bad pattern?

Explanation

Use the handler only for synchronous cleanup and logging, then exit with a non-zero code and let the orchestrator restart the process.

Further reading

Problem with a question

Node.js · Senior · question 49

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz