Class DatabaseLogExceptionFactory


  • public class DatabaseLogExceptionFactory
    extends Object
    • Constructor Detail

      • DatabaseLogExceptionFactory

        public DatabaseLogExceptionFactory()
    • Method Detail

      • getExceptionStrategy

        public static LogExceptionBehaviourInterface getExceptionStrategy​(LogTableCoreInterface table)

        Returns throw exception strategy depends on defined behavior. Default is suppress exception.

        This behavior can be overridden with 'kettle.properties' key-value using 'Edit Kettle.properties file' in Spoon or other.

        Following this strategy - System.getProperty(String key) call will be used to check if key-value pair is defined. If not found default behavior will be used. If not found and value is TRUE/Y - throwable behavior will be used.

        Parameters:
        table - logging table that participated in exception. Must be instance of LogTableCoreInterface, otherwise default suppress exception behavior will be used.
        Returns:
      • getExceptionStrategy

        public static LogExceptionBehaviourInterface getExceptionStrategy​(LogTableCoreInterface table,
                                                                          Exception e)

        Returns throw exception strategy depends on defined behavior. Default is suppress exception.

        This behavior can be overridden with 'kettle.properties' key-value using 'Edit Kettle.properties file' in Spoon or other.

        Following this strategy - System.getProperty(String key) call will be used to check if key-value pair is defined. If key-value pair is not defined or value is set to FALSE/N, exception will be checked and suppressable strategy with short message can be chosen, otherwise throwable behavior will be used

        Parameters:
        table - logging table that participated in exception. Must be instance of LogTableCoreInterface, otherwise default suppress exception behavior will be used.
        e - if key-value pair is not defined or value is set to FALSE/N, e will be checked and suppressable strategy with short message can be chosen.
        Returns: