mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-10-05 19:18:26 +00:00
isolate a malformed card response to the card that caused it
This commit is contained in:
@@ -112,6 +112,11 @@ public class CardImportPane extends TitledDescriptionPane {
|
||||
setError("Card Error", e.getMessage());
|
||||
importButton.setDisable(false);
|
||||
return;
|
||||
} catch(Exception e) {
|
||||
log.error("Error reading card", e);
|
||||
setError("Card Error", e.getMessage() == null ? e.getClass().getSimpleName() : e.getMessage());
|
||||
importButton.setDisable(false);
|
||||
return;
|
||||
}
|
||||
|
||||
CardImportService cardImportService = new CardImportService(importer, policyType, pin.get(), derivation, messageProperty);
|
||||
|
||||
@@ -98,6 +98,9 @@ public class Hwi {
|
||||
//ignore
|
||||
} catch(CardException e) {
|
||||
log.info("Error reading card", e);
|
||||
} catch(Exception e) {
|
||||
//a card is free to return any bytes it likes, so a malformed response can surface as any runtime exception
|
||||
log.error("Error reading card", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user