public class NoHostAvailableException extends DriverException
getErrors()
method.Constructor and Description |
---|
NoHostAvailableException(Map<InetSocketAddress,Throwable> errors) |
Modifier and Type | Method and Description |
---|---|
NoHostAvailableException |
copy()
Copy the exception.
|
String |
getCustomMessage(int maxErrors,
boolean formatted,
boolean includeStackTraces)
Builds a custom message for this exception.
|
Map<InetSocketAddress,Throwable> |
getErrors()
Return the hosts tried along with the error encountered while trying
them.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public NoHostAvailableException(Map<InetSocketAddress,Throwable> errors)
public Map<InetSocketAddress,Throwable> getErrors()
public String getCustomMessage(int maxErrors, boolean formatted, boolean includeStackTraces)
maxErrors
- the maximum number of errors displayed (useful to limit the size of the message for big clusters). Beyond this limit,
host names are still displayed, but not the associated errors. Set to Integer.MAX_VALUE
to display all hosts.formatted
- whether to format the output (line break between each host).includeStackTraces
- whether to include the full stacktrace of each host error. Note that this automatically implies
formatted
.public NoHostAvailableException copy()
DriverException
copy
in class DriverException
Copyright © 2012–2018. All rights reserved.