Class ErrorHandler

java.lang.Object
org.openqa.selenium.remote.ErrorHandler

public class ErrorHandler extends Object
Maps exceptions to status codes for sending over the wire.
  • Constructor Details

    • ErrorHandler

      public ErrorHandler()
    • ErrorHandler

      public ErrorHandler(boolean includeServerErrors)
      Parameters:
      includeServerErrors - Whether to include server-side details in thrown exceptions if the information is available.
    • ErrorHandler

      public ErrorHandler(ErrorCodes codes, boolean includeServerErrors)
      Parameters:
      includeServerErrors - Whether to include server-side details in thrown exceptions if the information is available.
      codes - The ErrorCodes object to use for linking error codes to exceptions.
  • Method Details

    • isIncludeServerErrors

      public boolean isIncludeServerErrors()
    • setIncludeServerErrors

      public void setIncludeServerErrors(boolean includeServerErrors)
    • throwIfResponseFailed

      public Response throwIfResponseFailed(Response response, long duration) throws RuntimeException
      Throws:
      RuntimeException