Skip to content

Commit 05a3b70

Browse files
committed
Added error logging
1 parent 5c5f3e5 commit 05a3b70

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/util/logger.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ export class Logger {
3434
this.output = undefined;
3535
}
3636
}
37+
38+
static error(err: Error, handled = false): void {
39+
if (!err) {
40+
return;
41+
}
42+
console.error(`${handled ? 'H' : 'Unh'}andled Error: ${err.stack || err.message || err.toString()}`);
43+
}
3744
}

0 commit comments

Comments
 (0)