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:
  ZooKeeperException

    public class SolrException
    extends RuntimeException

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `SolrException.ErrorCode`

### Field Summary

Fields
`static Set<String>` `ignorePatterns` For test code - do not log exceptions that match any of the regular expressions in ignorePatterns

### Constructor Summary

Constructors
Constructor and Description
`SolrException(SolrException.ErrorCode code, String msg)`
`SolrException(SolrException.ErrorCode code, String msg, Throwable th)`
`SolrException(SolrException.ErrorCode code, Throwable th)`

### Method Summary

Methods
`int` `code()`
`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.
`static Throwable` `getRootCause(Throwable t)`
`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)`
`static String` `toStr(Throwable e)`
`String` `toString()`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### ignorePatterns

    public static Set<String> ignorePatterns

For test code - do not log exceptions that match any of the regular expressions in ignorePatterns

### Constructor Detail

#### 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)

### Method Detail

#### code

    public int code()

#### 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)