Skip to content

Commit b326508

Browse files
committed
handle non-compiler errors
1 parent 2ad8d2f commit b326508

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/command/compile.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ export async function runCompile(): Promise<void> {
4545
log.invisible('this is a compiler error, logging the error');
4646
log.compilerError(e);
4747
log.error('', '', `A complete log including debug messages can be found in ${log.path()}`);
48+
} else {
49+
log.invisible(e);
50+
log.invisible('Unexpected error.');
51+
log.error(`${e.name}: ${e.message}`,'','',
52+
'This is an unexpected error. It might be due to an error on the compiler.',
53+
'You can report it to https://github.com/syntax-script/compiler or','https://github.com/syntax-script/syntaxs.','',
54+
`A complete log including debug messages can be found in ${log.path()}`);
4855
}
4956
}
5057

0 commit comments

Comments
 (0)