Just a simple alternative to specific try/catch blocks.

public class Safely {

  public static void handle(Attempter attempter, Handler handler) {
    try {
      attempter.attempt();
    } catch (Exception e) {
      if (handler != null) {
        handler.onException(e);
      }
    }
  }

  public static void handle(Attempter attempter) {
    handle(attempter, null);
  }

  public interface Attempter {
    void attempt();
  }

  public interface Handler {
    void onException(Exception e);
  }

}

Usage…

Safely.handle(this::someMethod, this::exceptionHandler);
// or just fail silently
Safely.handle(this::someMethod);