Package org.apache.solr.common
Class SolrException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- org.apache.solr.common.SolrException
 
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- BaseHttpSolrClient.RemoteSolrException,- CloudSolrClient.RouteException,- NonExistentCoreException
 
 public class SolrException extends RuntimeException - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classSolrException.ErrorCodeThis list of valid HTTP Status error codes that Solr may return in the case of a "Server Side" error.
 - 
Field SummaryFields Modifier and Type Field Description static StringERROR_CLASSprotected NamedList<String>metadatastatic StringROOT_ERROR_CLASS
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSolrException(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)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcode()The HTTP Status code associated with this Exception.NamedList<String>getMetadata()StringgetMetadata(String key)static ThrowablegetRootCause(Throwable t)StringgetRootThrowable()StringgetThrowable()voidlog(org.slf4j.Logger log)Deprecated.Use the Logger directlystatic voidlog(org.slf4j.Logger log, String msg)Deprecated.Use the Logger directlystatic voidlog(org.slf4j.Logger log, String msg, Throwable e)Deprecated.Use the Logger directlystatic voidlog(org.slf4j.Logger log, Throwable e)Deprecated.Use the Logger directlyvoidlogDebugWithMdc(org.slf4j.Logger logger, String msg)voidlogInfoWithMdc(org.slf4j.Logger logger, String msg)voidlogWarnWithMdc(org.slf4j.Logger logger, String msg)voidsetMetadata(String key, String value)voidsetMetadata(NamedList<String> metadata)- 
Methods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
- 
 
- 
- 
- 
Field Detail- 
ROOT_ERROR_CLASSpublic static final String ROOT_ERROR_CLASS - See Also:
- Constant Field Values
 
 - 
ERROR_CLASSpublic static final String ERROR_CLASS - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
SolrExceptionpublic SolrException(SolrException.ErrorCode code, String msg) 
 - 
SolrExceptionpublic SolrException(SolrException.ErrorCode code, String msg, Throwable th) 
 - 
SolrExceptionpublic SolrException(SolrException.ErrorCode code, Throwable th) 
 
- 
 - 
Method Detail- 
codepublic int code() The HTTP Status code associated with this Exception. For SolrExceptions thrown by Solr "Server Side", this should validSolrException.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.- Returns:
- The HTTP Status code associated with this Exception
 
 - 
getThrowablepublic String getThrowable() 
 - 
getRootThrowablepublic String getRootThrowable() 
 - 
log@Deprecated public void log(org.slf4j.Logger log) Deprecated.Use the Logger directlyThis method was initially created to aid in testing situations that were known to cause ERRORs. It should no longer be used by any new code.
 - 
log@Deprecated public static void log(org.slf4j.Logger log, Throwable e) Deprecated.Use the Logger directlyThis method was initially created to aid in testing situations that were known to cause ERRORs. It should no longer be used by any new code.
 - 
log@Deprecated public static void log(org.slf4j.Logger log, String msg, Throwable e) Deprecated.Use the Logger directlyThis method was initially created to aid in testing situations that were known to cause ERRORs. It should no longer be used by any new code.
 - 
log@Deprecated public static void log(org.slf4j.Logger log, String msg) Deprecated.Use the Logger directlyThis method was initially created to aid in testing situations that were known to cause ERRORs. It should no longer be used by any new code.
 - 
logInfoWithMdcpublic void logInfoWithMdc(org.slf4j.Logger logger, String msg)
 - 
logDebugWithMdcpublic void logDebugWithMdc(org.slf4j.Logger logger, String msg)
 - 
logWarnWithMdcpublic void logWarnWithMdc(org.slf4j.Logger logger, String msg)
 
- 
 
-