diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2019-07-29 19:11:08 +1000 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-07-29 09:11:08 +0000 |
commit | 5083f5fd908057cbc8649b79c13ab78a7f7ebf34 (patch) | |
tree | d0336672fd7760593695b2e0d351c401ed1d8c02 /js/main.ts | |
parent | ff96e3dc637974c6f9853f3bf9565bfd63f22b17 (diff) |
Remap stack traces of unthrown errors. (#2693)
Diffstat (limited to 'js/main.ts')
-rw-r--r-- | js/main.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/main.ts b/js/main.ts index cb27690b5..5687a6926 100644 --- a/js/main.ts +++ b/js/main.ts @@ -8,6 +8,7 @@ import "./globals"; import { assert, log } from "./util"; import * as os from "./os"; import { args } from "./deno"; +import { setPrepareStackTrace } from "./error_stack"; import { replLoop } from "./repl"; import { xevalMain, XevalFunc } from "./xeval"; import { setVersions } from "./version"; @@ -30,6 +31,8 @@ export default function denoMain(name?: string): void { os.exit(0); } + setPrepareStackTrace(Error); + const mainModule = startResMsg.mainModule(); if (mainModule) { assert(mainModule.length > 0); |