Summary: Ctors | Methods | Inherited Methods | [Expand All]

# DefaultFailureHandler

`public final class DefaultFailureHandler`
`extends Object` `implements FailureHandler`

java.lang.Object
↳ | android.support.test.espresso.base.DefaultFailureHandler

Espresso's default `FailureHandler`. If this does not fit your needs, feel free to provide your own implementation via Espresso.setFailureHandler(FailureHandler).

## Summary

### Public constructors
`DefaultFailureHandler(Context appContext)`

### Public methods
`void` | `handle(Throwable error, Matcher<View> viewMatcher)` Handle the given error in a manner that makes sense to the environment in which the test is executed (e.g.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()`
`boolean` | `equals(Object arg0)`
`void` | `finalize()`
`final Class<?>` | `getClass()`
`int` | `hashCode()`
`final void` | `notify()`
`final void` | `notifyAll()`
`String` | `toString()`
`final void` | `wait(long arg0, int arg1)`
`final void` | `wait(long arg0)`
`final void` | `wait()`
From interface `android.support.test.espresso.FailureHandler`
`abstract void` | `handle(Throwable error, Matcher<View> viewMatcher)` Handle the given error in a manner that makes sense to the environment in which the test is executed (e.g.

## Public constructors

### DefaultFailureHandler

    DefaultFailureHandler (Context appContext)

Parameters
`appContext` | `Context`

## Public methods

### handle

    void handle (Throwable error,
                    Matcher<View> viewMatcher)

Handle the given error in a manner that makes sense to the environment in which the test is executed (e.g. take a screenshot, output extra debug info, etc). Upon handling, most handlers will choose to propagate the error.

Parameters
`error` | `Throwable`
`viewMatcher` | `Matcher`

- ## Annotations

  - Default
  - MainThread

- ## Interfaces

  - ActiveRootLister

- ## Classes

  - BaseLayerModule
  - BaseLayerModule.FailureHandlerHolder
  - DefaultFailureHandler
  - IdlingResourceRegistry
  - RootViewPicker
  - UiControllerModule
  - ViewFinderImpl