Node.jsでグローバルなエラーをキャッチする方法

process.on('uncaughtException',  (err) =>  {
  console.error(err.stack)
  console.error("予期せぬエラー")
})