Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
171 stars 113 forks source link

Improve ErrorReporter to not report known exceptions #708

Closed jim618 closed 8 years ago

jim618 commented 8 years ago

There are a few errors/ stack traces that are known to be benign. Improve the error reporter so that these aren't reported to the user (and they can continue with MBHD).

gary-rowe commented 8 years ago

We must be judicious about including anything in the list of "benign" exceptions. In particular (and this is checked for in the isBenign method) the exception must not contain any org.multibit code. If it does then we have an opportunity to detect the failure and handle it.

Code that lies outside of our control (e.g. originating from a paste or focus transition entirely within Swing/JDK methods) is not possible for us to detect and thus is a candidate for inclusion if all investigation draws a blank on a solution.

To verify, add a code block similar to this into CredentialsEnterPasswordPanelView:

    if (true) {
      throw new NullPointerException("Plik");
    }

Note the error reporting dialog.

For further investigation, adjust ExceptionHandler.isBenign to treat this as benign. Observe the corrupted UI in the wallet list due to the failed method completion.

Ready for review and close.

jim618 commented 8 years ago

LGTM.

Closing.