Package uk.co.evoco.webdriver.utils
Class TolerantExceptionHandler
java.lang.Object
uk.co.evoco.webdriver.utils.TolerantExceptionHandler
public class TolerantExceptionHandler
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description TolerantExceptionHandler(java.util.List<java.lang.String> tolerantExceptions)TolerantExceptionHandler(java.util.List<java.lang.String> tolerantExceptions, org.slf4j.Logger logger) -
Method Summary
Modifier and Type Method Description java.lang.ThrowablepropagateIfNotIgnored(java.lang.Throwable throwable)Checks an input exception against a predefined list of tolerant exceptions.
-
Constructor Details
-
TolerantExceptionHandler
public TolerantExceptionHandler(java.util.List<java.lang.String> tolerantExceptions) -
TolerantExceptionHandler
public TolerantExceptionHandler(java.util.List<java.lang.String> tolerantExceptions, org.slf4j.Logger logger)
-
-
Method Details
-
propagateIfNotIgnored
public java.lang.Throwable propagateIfNotIgnored(java.lang.Throwable throwable) throws java.lang.ThrowableChecks an input exception against a predefined list of tolerant exceptions. It either:- returns the exception (if it's on the tolerant list) or
- throws the exception if it's not on the tolerant list.
- Parameters:
throwable- the throwable that needs to be handled- Returns:
- the input exception if is on the tolerant exceptions list
- Throws:
java.lang.Throwable- the input exception if it's not on the tolerant exceptions list
-