public class SolrException extends RuntimeException
| 限定符和类型 | 类和说明 |
|---|---|
static class |
SolrException.ErrorCode
This list of valid HTTP Status error codes that Solr may return in
the case of a "Server Side" error.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ERROR_CLASS |
static Set<String> |
ignorePatterns
For test code - do not log exceptions that match any of these regular expressions.
|
protected NamedList<String> |
metadata |
static String |
ROOT_ERROR_CLASS |
| 限定符 | 构造器和说明 |
|---|---|
protected |
SolrException(int code,
String msg,
Throwable th)
Constructor that can set arbitrary http status code.
|
|
SolrException(SolrException.ErrorCode code,
String msg) |
|
SolrException(SolrException.ErrorCode code,
String msg,
Throwable th) |
|
SolrException(SolrException.ErrorCode code,
Throwable th) |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
code()
The HTTP Status code associated with this Exception.
|
static String |
doIgnore(Throwable t,
String m)
Returns null if this exception does not match any ignore patterns, or a message string to use if it does.
|
NamedList<String> |
getMetadata() |
String |
getMetadata(String key) |
static Throwable |
getRootCause(Throwable t) |
String |
getRootThrowable() |
String |
getThrowable() |
void |
log(org.slf4j.Logger log) |
static void |
log(org.slf4j.Logger log,
String msg) |
static void |
log(org.slf4j.Logger log,
String msg,
Throwable e) |
static void |
log(org.slf4j.Logger log,
Throwable e) |
void |
logDebugWithMdc(org.slf4j.Logger logger,
String msg) |
void |
logInfoWithMdc(org.slf4j.Logger logger,
String msg) |
void |
logWarnWithMdc(org.slf4j.Logger logger,
String msg) |
void |
setMetadata(NamedList<String> metadata) |
void |
setMetadata(String key,
String value) |
static String |
toStr(Throwable e) |
String |
toString() |
public static Set<String> ignorePatterns
is recommended.public SolrException(SolrException.ErrorCode code, String msg)
public SolrException(SolrException.ErrorCode code, String msg, Throwable th)
public SolrException(SolrException.ErrorCode code, Throwable th)
public int code()
SolrException.ErrorCode,
however client side exceptions may contain an arbitrary error code based
on the behavior of the Servlet Container hosting Solr, or any HTTP
Proxies that may exist between the client and the server.public String getThrowable()
public String getRootThrowable()
public void log(org.slf4j.Logger log)
public static void log(org.slf4j.Logger log,
Throwable e)
public static void log(org.slf4j.Logger log,
String msg)
public static String doIgnore(Throwable t, String m)
public void logInfoWithMdc(org.slf4j.Logger logger,
String msg)
public void logDebugWithMdc(org.slf4j.Logger logger,
String msg)
public void logWarnWithMdc(org.slf4j.Logger logger,
String msg)
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.