3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 02:35:52 +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:
Andreas Schildbach 2016-09-29 11:54:03 +02:00
parent 93e5f7c57b
commit a34f41e287

View File

@ -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)