public class NoHostAvailableException extends DriverException
errors
method.Constructor and Description |
---|
NoHostAvailableException(Map<InetSocketAddress,Throwable> errors) |
Modifier and Type | Method and Description |
---|---|
DriverException |
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 DriverException copy()
DriverException
copy
in class DriverException