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.Throwable propagateIfNotIgnored​(java.lang.Throwable throwable)
    Checks an input exception against a predefined list of tolerant exceptions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.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:
      java.lang.Throwable - the input exception if it's not on the tolerant exceptions list