mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 18:02:38 +02:00
catch exception when claiming cable
This commit is contained in:
+9
-4
@@ -132,10 +132,15 @@ int main(int argc, char **argv)
|
||||
|
||||
/* jtag base */
|
||||
Jtag *jtag;
|
||||
if (args.device == "-")
|
||||
jtag = new Jtag(cable, pins_config, args.freq, false);
|
||||
else
|
||||
jtag = new Jtag(cable, pins_config, args.device, args.freq, false);
|
||||
try {
|
||||
if (args.device == "-")
|
||||
jtag = new Jtag(cable, pins_config, args.freq, false);
|
||||
else
|
||||
jtag = new Jtag(cable, pins_config, args.device, args.freq, false);
|
||||
} catch (std::exception &e) {
|
||||
printError("Error: Failed to claim cable");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* chain detection */
|
||||
vector<int> listDev;
|
||||
|
||||
Reference in New Issue
Block a user