Skip to content

Commit f8b1648

Browse files
committed
Fixed Error not beeing reported correctly
1 parent ef3ba60 commit f8b1648

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Compiler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ function compile(fileNames: string[], options: CompilerOptions): void {
6060
if (exception.node) {
6161
const pos = ts.getLineAndCharacterOfPosition(sourceFile, exception.node.pos);
6262
// Graciously handle transpilation errors
63-
throw new Error(
63+
console.error(
6464
"Encountered error parsing file: " + exception.message + "\n" +
6565
sourceFile.fileName +
6666
" line: " + (1 + pos.line) + " column: " + pos.character + "\n" +
67-
exception.stack);
67+
exception.stack
68+
);
69+
process.exit(1);
6870
} else {
6971
throw exception;
7072
}

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"indent": [true, "spaces", 4],
1212
"max-classes-per-file": 1,
1313
"max-line-length": [true, 120],
14-
"no-console": [true, "error"],
14+
"no-console": [false],
1515
"trailing-comma": [
1616
true,
1717
{

0 commit comments

Comments
 (0)