1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-27 20:55:25 +00:00

Set unexpected error handler on startup

Fixes #911.
This commit is contained in:
Asher 2019-08-15 15:53:20 -05:00
parent d1662d7658
commit f61a0ae78a
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -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<typeof import("@coder/logger/out/index")>("@coder/logger/out/index");
setUnexpectedErrorHandler((error) => logger.warn(error.message));
interface Args extends ParsedArgs {
auth?: AuthType;