[bisq-network/bisq] Add rpc wallet protection endpoints (#4214)

Chris Beams notifications at github.com
Sun May 3 17:36:13 UTC 2020


> RE commit [ab17b67](https://github.com/bisq-network/bisq/commit/ab17b672294011b766da3ab6e02a349c01c4f7e0): I was catching exceptions (indicating a bug or bugs to be fixed?) I've seen during testing this method. Otherwise they will bubble up to client.

I don't see the value in wrapping and rethrowing there. I'd rather see the exception bubble up as-is to the client and then see specific error handling code put wherever it's most appropriate. Wrapping it in an IllegalStateException may not really reflect the nature of the problem, e.g. just a programmer error.

> RE commit 9164579: I don't think an extra line for an explicit return; is needed for methods that return void.

If you don't explicitly return there, then the next`if` block will return `true` and throw because you just finished encrypting the wallet. Prior to your refactoring, you did explicitly return from that block with a `Tuple2`. You either need to return or make the subsequent `if` an `else if` block; your call.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4214#issuecomment-623149720
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200503/83de3a74/attachment.html>


More information about the bisq-github mailing list