Interface SeedExceptionTranslator


  • public interface SeedExceptionTranslator
    This interface can be implemented to provide an exception translator, capable of translating specific exceptions to a BaseException. Implementations must be declared as a ServiceLoader service in META-INF/services to be detected.
    • Method Detail

      • canTranslate

        boolean canTranslate​(Exception e)
        Check if the specified exception can be translated.
        Parameters:
        e - The candidate exception.
        Returns:
        true if this translator can translate it, false otherwise.
      • translate

        org.seedstack.shed.exception.BaseException translate​(Exception e)
        Translate the specified exception. It is strongly recommended to put the original exception as the cause of the translated one.
        Parameters:
        e - The exception to translate.
        Returns:
        the translated exception.