9
9
#include < util/system.h>
10
10
#include < external_signer.h>
11
11
12
+ #include < stdexcept>
12
13
#include < string>
13
14
#include < vector>
14
15
@@ -26,21 +27,21 @@ bool ExternalSigner::Enumerate(const std::string& command, std::vector<ExternalS
26
27
// Call <command> enumerate
27
28
const UniValue result = RunCommandParseJSON (command + " enumerate" );
28
29
if (!result.isArray ()) {
29
- throw ExternalSignerException (strprintf (" '%s' received invalid response, expected array of signers" , command));
30
+ throw std::runtime_error (strprintf (" '%s' received invalid response, expected array of signers" , command));
30
31
}
31
32
for (UniValue signer : result.getValues ()) {
32
33
// Check for error
33
34
const UniValue& error = find_value (signer, " error" );
34
35
if (!error.isNull ()) {
35
36
if (!error.isStr ()) {
36
- throw ExternalSignerException (strprintf (" '%s' error" , command));
37
+ throw std::runtime_error (strprintf (" '%s' error" , command));
37
38
}
38
- throw ExternalSignerException (strprintf (" '%s' error: %s" , command, error.getValStr ()));
39
+ throw std::runtime_error (strprintf (" '%s' error: %s" , command, error.getValStr ()));
39
40
}
40
41
// Check if fingerprint is present
41
42
const UniValue& fingerprint = find_value (signer, " fingerprint" );
42
43
if (fingerprint.isNull ()) {
43
- throw ExternalSignerException (strprintf (" '%s' received invalid response, missing signer fingerprint" , command));
44
+ throw std::runtime_error (strprintf (" '%s' received invalid response, missing signer fingerprint" , command));
44
45
}
45
46
const std::string fingerprintStr = fingerprint.get_str ();
46
47
// Skip duplicate signer
0 commit comments