code: public static <V> V defaultIfException(
          StatementWithReturnValue<V> statement,
          Class<? extends Throwable> exceptionType, V defaultValue) {
          try {
              return statement.evaluate();
          } catch (RuntimeException e) {
              if (exceptionType.isAssignableFrom(e.getClass()))
                  return defaultValue;
              else
                  throw e;
          } catch (Error e) {
              if (exceptionType.isAssignableFrom(e.getClass()))
                  return defaultValue;
              else
                  throw e;
          } catch (Throwable e) {
              if (exceptionType.isAssignableFrom(e.getClass()))
                  return defaultValue;
              else
                  throw new WrappedException(e);
          }
      }
docs: Executes the given statement and returns the statement's return
  value if no exception is thrown or the default value if an
  exception of the specified type is thrown.
  
  <pre>
  public void doSomething() {
  long value = defaultIfException(() -&gt; parseLong("NaN"), NumberFormatException.class, 0L);
  //value is 0
  }
  </pre>
  
  <p>(Any other checked exception is wrapped just as it is wrapped by
  {@link #wrapCheckedException(StatementWithReturnValue)}.)
  
  @param statement The statement that is executed.
  @param exceptionType the type of exception for which the default
  value is returned.
  @param defaultValue this value is returned if the statement
  throws an exception of the specified type.
  @param <V> type of the value that is returned by the statement.
  @return the return value of the statement or the default value.