From a9c398854a4564a878d1353ecd5b705b776beedd Mon Sep 17 00:00:00 2001 From: JJ Kasper <22380829+ijjk@users.noreply.github.com> Date: Fri, 1 Mar 2019 13:18:33 -0600 Subject: [PATCH] Add console.error before exit on uncaughtException (#6504) --- packages/next/build/output/exit.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/next/build/output/exit.ts b/packages/next/build/output/exit.ts index 06a1b773f2..29845a683f 100644 --- a/packages/next/build/output/exit.ts +++ b/packages/next/build/output/exit.ts @@ -24,7 +24,8 @@ export function onExit(fn: Function) { { event: 'uncaughtException', - handler: () => { + handler: (error: Error) => { + console.error('Got uncaughtException:', error) exit() process.exit(1) },