haveno/src
Chris Beams e08c2bb564
Handle IOException within ViewLoader#load
Prior to this change, all callers of ViewLoader#load were forced to
handle the (checked) IOException declared by the #load method signature.
This resulted in a significant amount of duplicate handling logic where
nothing more than logging the error occured.

Failing to load a view represents a catastrophic error in the
application; i.e. it is not something that can be handled in any way
other than shutting the application down, fixing what is broken and
restarting the application. For this reason, any IOException raised
within ViewLoader#load is now caught, wrapped and re-thrown as an
(unchecked) RuntimeException. This will be handled by the platform's
UncaughtExceptionHandler, and a dialog will be raised to inform the user
that a fatal error has occured.

As a result all try/catch blocks around calls to ViewLoader#load have
now been removed, making for tighter, more readable, and easier to test
code.

In the future, the distinction between errors that are programmatically
recoverable and those that are catastrophic (typically developer errors)
will be used to determine whether methods in the Bitsquare API throw
checked or unchecked exceptions.
2014-11-05 01:13:20 +01:00
..
deploy/package Use security deposit as flat rate instead of percentage, remove wording of collateral 2014-10-23 15:32:01 +02:00
main Handle IOException within ViewLoader#load 2014-11-05 01:13:20 +01:00
test/java Remove UI test runner classes and .fxml files 2014-11-05 01:13:18 +01:00