Skip to content

Commit d760e7a

Browse files
committed
[TSTEMPLATE-6] main() entrypoint should have catch block
1 parent 9d08079 commit d760e7a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [TSTEMPLATE-3][Docs] Typedoc --excludeNotExported switch is deprecated
77
- [TSTEMPLATE-4] Seperate index.ts from main.ts
88
- [TSTEMPLATE-5] Source mapping should be loaded before imports
9+
- [TSTEMPLATE-6] main() entrypoint should have catch block
910

1011
## [v1.2.0]
1112

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ import { env } from './environment';
44
async function main() {
55
logger.info('Hello ' + env.APP_TITLE);
66
}
7-
main();
7+
main()
8+
.catch(error => {
9+
logger.error(error);
10+
process.exit();
11+
});

0 commit comments

Comments
 (0)