mirror of https://github.com/apache/druid.git
More informative QueryInterruptedException toString() (#4642)
* More informative QueryInterruptedException toString() * Use StringUtils.format
This commit is contained in:
parent
9650d80f3e
commit
aa8d75004c
|
@ -21,6 +21,7 @@ package io.druid.query;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.druid.java.util.common.StringUtils;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
@ -109,6 +110,18 @@ public class QueryInterruptedException extends RuntimeException
|
|||
return host;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return StringUtils.format(
|
||||
"QueryInterruptedException{msg=%s, code=%s, class=%s, host=%s}",
|
||||
getMessage(),
|
||||
errorCode,
|
||||
errorClass,
|
||||
host
|
||||
);
|
||||
}
|
||||
|
||||
private static String getErrorCodeFromThrowable(Throwable e)
|
||||
{
|
||||
if (e instanceof QueryInterruptedException) {
|
||||
|
|
Loading…
Reference in New Issue