From f61a0ae78a6902b594a8061ff22760f769fbe635 Mon Sep 17 00:00:00 2001 From: Asher Date: Thu, 15 Aug 2019 15:53:20 -0500 Subject: [PATCH] Set unexpected error handler on startup Fixes #911. --- src/cli.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cli.ts b/src/cli.ts index 28b464872..848451543 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -1,5 +1,6 @@ import * as cp from "child_process"; import * as os from "os"; +import { setUnexpectedErrorHandler } from "vs/base/common/errors"; import { main as vsCli } from "vs/code/node/cliProcessMain"; import { validatePaths } from "vs/code/node/paths"; import { ParsedArgs } from "vs/platform/environment/common/environment"; @@ -13,6 +14,7 @@ import { MainServer } from "vs/server/src/server"; import { AuthType, buildAllowedMessage, enumToArray, generateCertificate, generatePassword, localRequire, open, unpackExecutables } from "vs/server/src/util"; const { logger } = localRequire("@coder/logger/out/index"); +setUnexpectedErrorHandler((error) => logger.warn(error.message)); interface Args extends ParsedArgs { auth?: AuthType;