File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
part-1-web-server-basics/hr_app
part-2-database-basics/hr_app Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ async function shutdown(e) {
3434 console . log ( 'Exiting process' ) ;
3535
3636 if ( err ) {
37- process . exit ( 1 ) ;
37+ process . exit ( 1 ) ; // Non-zero failure code
3838 } else {
3939 process . exit ( 0 ) ;
4040 }
@@ -53,7 +53,8 @@ process.on('SIGINT', () => {
5353} ) ;
5454
5555process . on ( 'uncaughtException' , err => {
56- console . log ( 'Uncaught exception' , err ) ;
56+ console . log ( 'Uncaught exception' ) ;
57+ console . error ( err ) ;
5758
5859 shutdown ( err ) ;
5960} ) ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ async function shutdown(e) {
6060 console . log ( 'Exiting process' ) ;
6161
6262 if ( err ) {
63- process . exit ( 1 ) ;
63+ process . exit ( 1 ) ; // Non-zero failure code
6464 } else {
6565 process . exit ( 0 ) ;
6666 }
@@ -79,7 +79,8 @@ process.on('SIGINT', () => {
7979} ) ;
8080
8181process . on ( 'uncaughtException' , err => {
82- console . log ( 'Uncaught exception' , err ) ;
82+ console . log ( 'Uncaught exception' ) ;
83+ console . error ( err ) ;
8384
8485 shutdown ( err ) ;
8586} ) ;
You can’t perform that action at this time.
0 commit comments