All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bellotapps.utils.error_handler.ExceptionHandler Maven / Gradle / Ivy

There is a newer version: 2.1.0-RELEASE
Show newest version
package com.bellotapps.utils.error_handler;

/**
 * Defines behaviour for an object that can handles a given type of {@link Throwable}.
 * In order to register a concrete implementation of this interface in the {@link ErrorHandler},
 * the implementing class must be annotated with
 * {@link ExceptionHandlerObject}.
 *
 * @param  The concrete type of {@link Throwable} that will be handled by the object implementing this interface.
 * @author Juan Marcos Bellini
 * @see ExceptionHandlerObject
 * @see ErrorHandler
 * @see EnableErrorHandler
 */
@FunctionalInterface
public interface ExceptionHandler {

    /**
     * Handles the given {@code exception}.
     *
     * @param exception The exception to be handled.
     * @return The {@link ErrorHandler.HandlingResult} of handling the given {@code exception}.
     */
    ErrorHandler.HandlingResult handle(T exception);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy