1'use strict'; 2 3// Keep the event loop alive. 4setTimeout(() => {}, 1e6); 5 6process.on('uncaughtExceptionMonitor', (err) => { 7 console.log(`Monitored: ${err.message}`); 8}); 9 10throw new Error('Shall exit'); 11