mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 05:27:17 +00:00
ECKey: If deriving the private keys fails in toString(), print the exception to the message rather than throwing.
This commit is contained in:
@@ -1259,6 +1259,9 @@ public class ECKey implements EncryptableItem {
|
|||||||
helper.add("priv WIF", getPrivateKeyAsWiF(params));
|
helper.add("priv WIF", getPrivateKeyAsWiF(params));
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
// TODO: Make hasPrivKey() work for deterministic keys and fix this.
|
// TODO: Make hasPrivKey() work for deterministic keys and fix this.
|
||||||
|
} catch (Exception e) {
|
||||||
|
final String message = e.getMessage();
|
||||||
|
helper.add("priv EXCEPTION", e.getClass().getName() + (message != null ? ": " + message : ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (creationTimeSeconds > 0)
|
if (creationTimeSeconds > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user