Class DatabaseLogExceptionFactory
- java.lang.Object
-
- org.pentaho.di.core.database.util.DatabaseLogExceptionFactory
-
public class DatabaseLogExceptionFactory extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
KETTLE_GLOBAL_PROP_NAME
-
Constructor Summary
Constructors Constructor Description DatabaseLogExceptionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LogExceptionBehaviourInterface
getExceptionStrategy(LogTableCoreInterface table)
Returns throw exception strategy depends on defined behavior.static LogExceptionBehaviourInterface
getExceptionStrategy(LogTableCoreInterface table, Exception e)
Returns throw exception strategy depends on defined behavior.
-
-
-
Field Detail
-
KETTLE_GLOBAL_PROP_NAME
public static final String KETTLE_GLOBAL_PROP_NAME
- See Also:
- Constant Field Values
-
-
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 ofLogTableCoreInterface
, 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 ofLogTableCoreInterface
, 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:
-
-