Skip to content

Commit 943f7d2

Browse files
committed
fix(cli): rethrow errors in catch to see full trace stack in console
Signed-off-by: Vojtech Mašek <vojtech.masek@flowup.cz>
1 parent d217989 commit 943f7d2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ generate(options)
6363
logWarn(`\nLegacy models discovered:\n${legacyFiles.join('\n')}`);
6464
}
6565
})
66-
.catch((error: Error) =>
66+
.catch((error: Error) => {
6767
console.error(
6868
...(argv.verbose
6969
? ['Error encountered during generating:', error]
7070
: [error.message]),
71-
),
72-
);
71+
);
72+
throw error;
73+
});

0 commit comments

Comments
 (0)