org.openqa.selenium.remote
Class ErrorHandler

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

public class ErrorHandler
extends java.lang.Object

Maps exceptions to status codes for sending over the wire.

Author:
[email protected] (Jason Leyba)

Nested Class Summary
static class ErrorHandler.UnknownServerException
          Exception used as a place holder if the server returns an error without a stack trace.
 
Constructor Summary
ErrorHandler()
           
ErrorHandler(boolean includeServerErrors)
           
 
Method Summary
 boolean isIncludeServerErrors()
           
 void setIncludeServerErrors(boolean includeServerErrors)
           
 Response throwIfResponseFailed(Response response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorHandler

public ErrorHandler()

ErrorHandler

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

isIncludeServerErrors

public boolean isIncludeServerErrors()

setIncludeServerErrors

public void setIncludeServerErrors(boolean includeServerErrors)

throwIfResponseFailed

public Response throwIfResponseFailed(Response response)
                               throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException


Copyright © 2011. All Rights Reserved.