additionally check for trezor model against internal name, improve exception handling on no match

This commit is contained in:
Craig Raw 2025-02-16 08:43:45 +02:00
parent 8953d404fa
commit 6a6a6b1cca
2 changed files with 2 additions and 2 deletions

2
lark

@ -1 +1 @@
Subproject commit 81a7a86e1c7e83c80723cf48f910500771cfa0c4
Subproject commit 480f8ed73f0b8053c695d212f19e50a7d120a30c

View file

@ -56,7 +56,7 @@ public class Hwi {
return lark.enumerate().stream().map(Device::fromHardwareClient).toList();
} catch(Throwable e) {
log.error("Error enumerating USB devices", e);
throw new ImportException("Error scanning" + (e.getMessage() == null || e.getMessage().isEmpty() ? ", check devices are ready" : ": " + e.getMessage()), e);
throw new ImportException(e.getMessage() == null || e.getMessage().isEmpty() ? "Error scanning, check devices are ready" : e.getMessage(), e);
} finally {
isPromptActive = false;
}