# Operation.State.FAILURE

# Operation.State.FAILURE

Artifact:[androidx.work:work-runtime](https://developer.android.com/jetpack/androidx/releases/work)  
[View Source](https://cs.android.com/search?q=file:androidx/work/Operation.java+class:androidx.work.Operation.State.FAILURE)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/work#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/work/Operation.State.FAILURE "View this page in Java")

<br />

```
class Operation.State.FAILURE : Operation.State
```

<br />

|---|---|-------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                  |||
| ↳ | [androidx.work.Operation.State](https://developer.android.com/reference/kotlin/androidx/work/Operation.State)                    ||
|   | ↳ | [androidx.work.Operation.State.FAILURE](https://developer.android.com/reference/kotlin/androidx/work/Operation.State.FAILURE) |

*** ** * ** ***

This represents an[Operation](https://developer.android.com/reference/kotlin/androidx/work/Operation)which has failed.

## Summary

|                                                                                                       ### Public constructors                                                                                                        |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [FAILURE](https://developer.android.com/reference/kotlin/androidx/work/Operation.State.FAILURE#FAILURE(java.lang.Throwable))`(exception: `[Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)`)` |

|                                  ### Public functions                                   |
|-----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) | [getThrowable](https://developer.android.com/reference/kotlin/androidx/work/Operation.State.FAILURE#getThrowable())`()` |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)       | [toString](https://developer.android.com/reference/kotlin/androidx/work/Operation.State.FAILURE#toString())`()`         |

## Public constructors

### FAILURE

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/work#1.0.0)  

```
FAILURE(exception: Throwable)
```  

## Public functions

### getThrowable

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/work#1.0.0)  

```
fun getThrowable(): Throwable
```  

|                                         Returns                                         |
|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) | The[Throwable](https://developer.android.com/reference/java/lang/Throwable.html)which caused the[Operation](https://developer.android.com/reference/kotlin/androidx/work/Operation)to fail. |

### toString

```
fun toString(): String
```