Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs catch uncaught exception

process
	.on('uncaughtException', (err) => console.error(err, 'Uncaught Exception'))
	.on('unhandledRejection', (reason, promise) =>
		console.error(reason, 'Unhandled Rejection at', promise)
	);
 
PREVIOUS NEXT
Tagged: #nodejs #catch #uncaught #exception
ADD COMMENT
Topic
Name
3+7 =