Package org.openqa.selenium.remote
Class ErrorHandler
java.lang.Object
org.openqa.selenium.remote.ErrorHandler
Maps exceptions to status codes for sending over the wire.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exception used as a place holder if the server returns an error without a stack trace. -
Constructor Summary
ConstructorDescriptionErrorHandler
(boolean includeServerErrors) ErrorHandler
(ErrorCodes codes, boolean includeServerErrors) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setIncludeServerErrors
(boolean includeServerErrors) throwIfResponseFailed
(Response response, long duration)
-
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
- 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
- Throws:
RuntimeException
-