Skip to content

Commit ed6dfc1

Browse files
authored
Merge pull request #59 from camillobruni/2025-03-26_cli_error_handling
Throw errors in cli.js
2 parents bbcfe51 + abbec70 commit ed6dfc1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cli.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
const isInBrowser = false;
2727
console = {
28-
log: print
28+
log: globalThis?.console?.log ?? print,
29+
error: globalThis?.console?.error ?? print,
2930
}
3031

3132
const isD8 = typeof Realm !== "undefined";
@@ -57,8 +58,9 @@ async function runJetStream() {
5758
await JetStream.initialize();
5859
await JetStream.start();
5960
} catch (e) {
60-
console.log("JetStream3 failed: " + e);
61-
console.log(e.stack);
61+
console.error("JetStream3 failed: " + e);
62+
console.error(e.stack);
63+
throw e;
6264
}
6365
}
6466
runJetStream();

0 commit comments

Comments
 (0)