aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/util.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/util.ts b/editors/code/src/util.ts
index acf78898b..203494459 100644
--- a/editors/code/src/util.ts
+++ b/editors/code/src/util.ts
@@ -3,7 +3,12 @@ import * as vscode from "vscode";
3import { strict as nodeAssert } from "assert"; 3import { strict as nodeAssert } from "assert";
4 4
5export function assert(condition: unknown, explanation: string): asserts condition { 5export function assert(condition: unknown, explanation: string): asserts condition {
6 nodeAssert(condition, explanation); 6 try {
7 nodeAssert(condition, explanation);
8 } catch (err) {
9 log.error(`Assertion failed:`, explanation);
10 throw err;
11 }
7} 12}
8 13
9export const log = { 14export const log = {