public class SolrException extends RuntimeException
Modifier and Type | Class and Description |
---|---|
static class |
SolrException.ErrorCode
This list of valid HTTP Status error codes that Solr may return in
the case of a "Server Side" error.
|
Modifier and Type | Field and Description |
---|---|
static String |
ERROR_CLASS |
static Set<String> |
ignorePatterns
Deprecated.
use
ErrorLogMuter in Solr test-framework. |
protected NamedList<String> |
metadata |
static String |
ROOT_ERROR_CLASS |
Modifier | Constructor and Description |
---|---|
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) |
Modifier and Type | Method and Description |
---|---|
int |
code()
The HTTP Status code associated with this Exception.
|
static String |
doIgnore(Throwable t,
String stacktrace)
Deprecated.
use
ErrorLogMuter in Solr test-framework. |
NamedList<String> |
getMetadata() |
String |
getMetadata(String key) |
static Throwable |
getRootCause(Throwable t) |
String |
getRootThrowable() |
String |
getThrowable() |
void |
log(org.slf4j.Logger log)
Deprecated.
Use the Logger directly
|
static void |
log(org.slf4j.Logger log,
String msg)
Deprecated.
Use the Logger directly
|
static void |
log(org.slf4j.Logger log,
String msg,
Throwable e)
Deprecated.
Use the Logger directly
|
static void |
log(org.slf4j.Logger log,
Throwable e)
Deprecated.
Use the Logger directly
|
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)
Deprecated.
use
Throwable.printStackTrace() directly |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final String ROOT_ERROR_CLASS
public static final String ERROR_CLASS
@Deprecated public static Set<String> ignorePatterns
ErrorLogMuter
in Solr test-framework.log(org.slf4j.Logger)
from logging any msg or exception (stack trace) that matches an included regular expressions.
A 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()
@Deprecated public void log(org.slf4j.Logger log)
ignorePatterns
@Deprecated public static void log(org.slf4j.Logger log, Throwable e)
ignorePatterns
@Deprecated public static void log(org.slf4j.Logger log, String msg, Throwable e)
ignorePatterns
@Deprecated public static void log(org.slf4j.Logger log, String msg)
ignorePatterns
@Deprecated public static String toStr(Throwable e)
Throwable.printStackTrace()
directlyignorePatterns
@Deprecated public static String doIgnore(Throwable t, String stacktrace)
ErrorLogMuter
in Solr test-framework.t
- the original exception (only used for assertion checking)stacktrace
- the stringified stack trace of the exception, used for the acutal regex checkingignorePatterns
,
toStr(java.lang.Throwable)
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 © 2000-2024 Apache Software Foundation. All Rights Reserved.