File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,7 @@ try {
222222 const gpUrlNormalized = gpUrl . split ( '?' ) [ 0 ] . replace ( / \/ $ / , '' ) ;
223223 const found = urls . some ( url => url . split ( '?' ) [ 0 ] . replace ( / \/ $ / , '' ) === gpUrlNormalized ) ;
224224 if ( ! found ) {
225- console . error ( `[GamerPower] ERROR: ${ gpUrl } is NOT in Epic's free games list!` ) ;
226- console . error ( `[GamerPower] Epic's free games: ${ urls . join ( ', ' ) } ` ) ;
225+ throw new Error ( `[GamerPower] ${ gpUrl } is NOT in Epic's free games list! Epic's free games: ${ urls . join ( ', ' ) } ` ) ;
227226 } else {
228227 console . log ( `[GamerPower] OK: ${ gpUrl } ` ) ;
229228 }
Original file line number Diff line number Diff line change @@ -173,8 +173,7 @@ try {
173173 const gpSlug = gpMatch ? gpMatch [ 1 ] : gpUrl . split ( '/' ) . pop ( ) ;
174174 const found = url && url . includes ( gpSlug ) ;
175175 if ( ! found ) {
176- console . error ( `[GamerPower] ERROR: ${ gpUrl } does NOT match GOG's current giveaway!` ) ;
177- console . error ( `[GamerPower] GOG's current giveaway: ${ url } ` ) ;
176+ throw new Error ( `[GamerPower] ${ gpUrl } does NOT match GOG's current giveaway: ${ url } ` ) ;
178177 } else {
179178 console . log ( `[GamerPower] OK: ${ gpUrl } ` ) ;
180179 }
You can’t perform that action at this time.
0 commit comments