diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2019-02-11 15:06:22 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-11 18:06:22 -0500 |
commit | 1e5e091cb074896c7550b1b6f802582f12629048 (patch) | |
tree | ba4c5ad4e7d31871df097e614fd5356ca3d9fdfe /js/repl.ts | |
parent | a4dec944bc821d114bfd82debb72d60bd04f836d (diff) |
Fix REPL formatting (#1744)
Diffstat (limited to 'js/repl.ts')
-rw-r--r-- | js/repl.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/js/repl.ts b/js/repl.ts index e452eb191..00b88d8bb 100644 --- a/js/repl.ts +++ b/js/repl.ts @@ -103,8 +103,7 @@ export async function replLoop(): Promise<void> { if (err.message !== "Interrupted") { // e.g. this happens when we have deno.close(3). // We want to display the problem. - const formattedError = formatError( - libdeno.errorToJSON(err)); + const formattedError = formatError(libdeno.errorToJSON(err)); console.error(formattedError); } // Quit REPL anyways. @@ -126,8 +125,7 @@ export async function replLoop(): Promise<void> { } else { // e.g. this happens when we have deno.close(3). // We want to display the problem. - const formattedError = formatError( - libdeno.errorToJSON(err)); + const formattedError = formatError(libdeno.errorToJSON(err)); console.error(formattedError); quitRepl(1); } @@ -143,8 +141,7 @@ function evaluate(code: string): boolean { const [result, errInfo] = libdeno.evalContext(code); if (!errInfo) { console.log(result); - } else if (errInfo.isCompileError && - isRecoverableError(errInfo.thrown)) { + } else if (errInfo.isCompileError && isRecoverableError(errInfo.thrown)) { // Recoverable compiler error return false; // don't consume code. } else { |