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:
- CloudSolrServer.RouteException, HttpSolrServer.RemoteSolrException, ZooKeeperException
public class SolrException
- extends RuntimeException
- See Also:
- Serialized Form
Nested Class Summary |
static class |
SolrException.ErrorCode
This list of valid HTTP Status error codes that Solr may return in
the case of a "Server Side" error. |
Field Summary |
static Set<String> |
ignorePatterns
For test code - do not log exceptions that match any of the regular expressions in ignorePatterns |
ignorePatterns
public static Set<String> ignorePatterns
- For test code - do not log exceptions that match any of the regular expressions in ignorePatterns
SolrException
public SolrException(SolrException.ErrorCode code,
String msg)
SolrException
public SolrException(SolrException.ErrorCode code,
String msg,
Throwable th)
SolrException
public SolrException(SolrException.ErrorCode code,
Throwable th)
SolrException
protected SolrException(int code,
String msg,
Throwable th)
- Constructor that can set arbitrary http status code. Not for
use in Solr, but may be used by clients in subclasses to capture
errors returned by the servlet container or other HTTP proxies.
code
public int code()
- The HTTP Status code associated with this Exception. For SolrExceptions
thrown by Solr "Server Side", this should valid
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.
- Returns:
- The HTTP Status code associated with this Exception
log
public void log(org.slf4j.Logger log)
log
public static void log(org.slf4j.Logger log,
Throwable e)
log
public static void log(org.slf4j.Logger log,
String msg,
Throwable e)
log
public static void log(org.slf4j.Logger log,
String msg)
toString
public String toString()
- Overrides:
toString
in class Throwable
toStr
public static String toStr(Throwable e)
doIgnore
public 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.
getRootCause
public static Throwable getRootCause(Throwable t)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.