spring-geode/src/main/java/org/springframework/geode/core/util/ObjectUtils.java
/**
	 * Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception}
	 * thrown during the normal execution of the operation by invoking the provided {@link Exception}
	 * handling {@link Function}.
	 *
	 * @param <T> {@link Class type} of {@link Object value} returned from the execution of the operation.
	 * @param operation {@link ExceptionThrowingOperation} to execute; must not be {@literal null}.
	 * @param exceptionHandlingFunction {@link Function} used to handle any checked {@link Exception}
	 * thrown by {@link ExceptionThrowingOperation}; must not be {@literal null}.
	 * @return the result of the {@link ExceptionThrowingOperation}.
	 * @see org.springframework.geode.core.util.ObjectUtils.ExceptionThrowingOperation
	 * @see java.util.function.Function
	 * @see java.lang.Throwable
	 */
Safely executes the given  ExceptionThrowingOperation handling any checked  Exception
thrown during the normal execution of the operation by invoking the provided  Exception
handling  Function.

@param   Class type of  Object value returned from the execution of the operation.
@param operation  ExceptionThrowingOperation to execute; must not be  null.
@param exceptionHandlingFunction  Function used to handle any checked  Exception
thrown by  ExceptionThrowingOperation; must not be  null.
@return the result of the  ExceptionThrowingOperation.
Safely executes the given ExceptionThrowingOperation handling any checked Exception thrown during the normal execution of the operation by invoking the provided Exception handling Function . @param Class type of Object value returned from the execution of the operation . @param operation ExceptionThrowingOperation to execute ; must not be null . @param exceptionHandlingFunction Function used to handle any checked Exception thrown by ExceptionThrowingOperation ; must not be null . @return the result of the ExceptionThrowingOperation .
public static <T> T doOperationSafely(@NonNull ExceptionThrowingOperation<T> operation,
			@NonNull Function<Throwable, T> exceptionHandlingFunction) {
		try {
			return operation.run();
		}
		catch (Exception cause) {
			if (logger.isDebugEnabled()) {
				logger.debug(String.format("Failed to execute operation [%s]", operation), cause);
			}
			return exceptionHandlingFunction.apply(cause);
		}
	}
public static < T > T doOperationSafely ( @ NonNull ExceptionThrowingOperation < T > operation , @ NonNull Function < Throwable , T > exceptionHandlingFunction ) { try { return operation . run ( ) ; } catch ( Exception cause ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( String . format ( "Failed to execute operation [%s]" , operation ) , cause ) ; } return exceptionHandlingFunction . apply ( cause ) ; } }
Safely executes the given {@link ExceptionThrowingOperation} handling any checked {@link Exception}
 thrown during the normal execution of the operation by invoking the provided {@link Exception}
 handling {@link Function}.
Safely executes the given { @link ExceptionThrowingOperation } handling any checked { @link Exception } thrown during the normal execution of the operation by invoking the provided { @link Exception } handling { @link Function } .