[bisq-network/bisq] Throw UncheckedIOException on directory creation errors (#4002)

Chris Beams notifications at github.com
Mon Feb 24 10:34:00 UTC 2020


Previously, Config#mkdir and #mkAppDir threw ConfigException if any
underlying IOException was thrown from Files#createDirectory or
Files#createDirectories respectively. This resulted in only a simple
error message being reported at the command line and the details of the
underlying exception's stack trace were lost. This change wraps and
rethrows the underlying IOException as an UncheckedIOException such that
it gets caught by the catch(Throwable) clause in BisqExecutable, which
does print a stacktrace to stderr. This is the way it always should have
worked; throwing ConfigException in these cases was an oversight in the
original implementation. This change also removes the ConfigException
constructor that allows for passing a nested exception to be wrapped as
there is actually no use case for this now that these two anomalies have
been corrected.

Note to maintainers: while this change was made in the process of attempting to reproduce #3998, it should be merged in any case, independent of the resolution of that bug.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4002

-- Commit Summary --

  * Throw UncheckedIOException on directory creation errors

-- File Changes --

    M common/src/main/java/bisq/common/config/Config.java (4)
    M common/src/main/java/bisq/common/config/ConfigException.java (4)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4002.patch
https://github.com/bisq-network/bisq/pull/4002.diff

-- 
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/4002
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200224/e1639de0/attachment.html>


More information about the bisq-github mailing list