code: public static <T> T doOperationSafely(ExceptionThrowingOperation<T> operation, T defaultValue) {
  
      try {
        return operation.doExceptionThrowingOperation();
      }
      catch (Exception cause) {
        return returnValueOrThrowIfNull(defaultValue,
          newIllegalStateException(cause, "Failed to execute operation [%s]", operation));
      }
    }
docs: Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception}
  thrown during the normal execution of the operation by returning the given {@link Object default value}
  or rethrowing an {@link IllegalStateException} if the {@link Object default value} is {@literal null}.
  
  @param <T> {@link Class type} of the return value.
  @param operation {@link ExceptionThrowingOperation} to execute.
  @param defaultValue {@link Object} to return if the {@link ExceptionThrowingOperation}
  throws a checked {@link Exception}.
  @return the {@link Object result} of the {@link ExceptionThrowingOperation} or {@link Object default value}
  if the {@link ExceptionThrowingOperation} throws a checked {@link Exception}.
  @see org.cp.elements.lang.ObjectUtils.ExceptionThrowingOperation
  @see #returnValueOrThrowIfNull(Object, RuntimeException)