Package com.version1.webdriver.utils
Class TolerantExceptionHandler
java.lang.Object
com.version1.webdriver.utils.TolerantExceptionHandler
-
Constructor Summary
ConstructorsConstructorDescriptionTolerantExceptionHandler(List<String> tolerantExceptions) TolerantExceptionHandler(List<String> tolerantExceptions, org.slf4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionpropagateIfNotIgnored(Throwable throwable) Checks an input exception against a predefined list of tolerant exceptions.
-
Constructor Details
-
TolerantExceptionHandler
-
TolerantExceptionHandler
-
-
Method Details
-
propagateIfNotIgnored
Checks 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:
Throwable- the input exception if it's not on the tolerant exceptions list
-