Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Catch errors in card adding
Browse files Browse the repository at this point in the history
  • Loading branch information
aleho committed Apr 25, 2020
1 parent cddf482 commit f339684
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions [email protected]/lib/utils/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,14 @@ var Cards = class {
let paCard = await this.get(index);

if (!paCard || paCard.fake) {
paCard = await PaHelper.getCardByIndex(index);
try {
paCard = await PaHelper.getCardByIndex(index);
} catch (e) {
Log.error('Cards', '_onCardAdded', 'Calling Python helper failed');
}

if (!paCard) {
Log.error('Cards', '_addCard', 'GVC card not found through Python helper');
Log.error('Cards', '_onCardAdded', 'GVC card not found through Python helper');

// external script couldn't get card info, fake it
paCard = {
Expand Down

0 comments on commit f339684

Please sign in to comment.