# SurfaceTexture.OutOfResourcesException

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# OutOfResourcesException

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/SurfaceTexture.OutOfResourcesException "View this page in Java")  

```
open class OutOfResourcesException : Exception
```

|---|---|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                           ||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)                                                                            |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/kotlin/java/lang/Exception.html#)                                                                       ||
|   |   | ↳ | [android.graphics.SurfaceTexture.OutOfResourcesException](https://developer.android.com/reference/kotlin/android/graphics/SurfaceTexture.OutOfResourcesException#) |

*** ** * ** ***

| **This exception was deprecated in API level 19.**
|
| No longer thrown.[android.view.Surface.OutOfResourcesException](https://developer.android.com/reference/kotlin/android/view/Surface.OutOfResourcesException.html#)is used instead.

Exception thrown when a SurfaceTexture couldn't be created or resized.

## Summary

|                                                                                                                                Public constructors                                                                                                                                ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [OutOfResourcesException](https://developer.android.com/reference/kotlin/android/graphics/SurfaceTexture.OutOfResourcesException#OutOfResourcesException())`()` <br />                                                                                                         |
| [OutOfResourcesException](https://developer.android.com/reference/kotlin/android/graphics/SurfaceTexture.OutOfResourcesException#OutOfResourcesException(kotlin.String))`(`name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` <br /> |

## Public constructors

### OutOfResourcesException

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
OutOfResourcesException()
```  

### OutOfResourcesException

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
OutOfResourcesException(name: String!)
```