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