Class TolerantExceptionHandler

java.lang.Object
com.version1.webdriver.utils.TolerantExceptionHandler

public class TolerantExceptionHandler extends Object
  • Constructor Details

    • TolerantExceptionHandler

      public TolerantExceptionHandler(List<String> tolerantExceptions)
    • TolerantExceptionHandler

      public TolerantExceptionHandler(List<String> tolerantExceptions, org.slf4j.Logger logger)
  • Method Details

    • propagateIfNotIgnored

      public Throwable propagateIfNotIgnored(Throwable throwable) throws Throwable
      Checks an input exception against a predefined list of tolerant exceptions. It either:
      1. returns the exception (if it's on the tolerant list) or
      2. 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