File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,18 @@ async function main () {
25
25
try {
26
26
countries = await getCountries ( )
27
27
} catch ( error ) {
28
+ console . log ( error )
28
29
console . log ( '--- No Countries were found, a restart is suggested ---' )
29
- process . exit ( 0 )
30
+ process . exit ( - 3 )
30
31
}
31
32
32
33
let cities = [ ]
33
34
try {
34
35
cities = await getCities ( )
35
36
} catch ( error ) {
37
+ console . log ( error )
36
38
console . log ( '--- No Cities were found, a restart is suggested ---' )
37
- process . exit ( 0 )
39
+ process . exit ( - 2 )
38
40
}
39
41
40
42
const pool = new Pool ( config )
@@ -102,12 +104,12 @@ async function main () {
102
104
. then ( res => {
103
105
console . log ( res )
104
106
} )
105
- . catch ( err => console . log ( err ) )
107
+ . catch ( err => { console . log ( err ) ; process . exit ( 1 ) } )
106
108
. then ( process . exit ( 0 ) )
107
109
108
110
} catch ( error ) {
109
111
console . log ( error )
110
- process . exit ( 0 )
112
+ process . exit ( 2 )
111
113
}
112
114
}
113
115
You can’t perform that action at this time.
0 commit comments