# EmptyResultSetException

Artifact: [androidx.room:room-rxjava3](https://developer.android.com/jetpack/androidx/releases/room) [View Source](https://cs.android.com/search?q=file:androidx/room/rxjava3/EmptyResultSetException.kt+class:androidx.room.rxjava3.EmptyResultSetException) Added in [2.3.0](https://developer.android.com/jetpack/androidx/releases/room#2.3.0)

*** ** * ** ***

<br />

```
class EmptyResultSetException : RuntimeException
```

<br />

|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html) ||
|   |   |   | ↳ | [androidx.room.rxjava3.EmptyResultSetException](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/EmptyResultSetException) |

*** ** * ** ***

Thrown by Room when the query in a `http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Single.html` DAO method needs to return a result but the returned result from the database is empty.

Since a `http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Single.html` must either emit a single non-null value or an error, this exception is thrown instead of emitting a null value when the query resulted empty. If the `http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Single.html` contains a type argument of a collection (e.g. `Single<List<Song>>`) the this exception is not thrown an an empty collection is emitted instead.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/room/rxjava3/EmptyResultSetException#EmptyResultSetException(kotlin.String)(message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |

### Inherited functions

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintStream.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintWriter.html)`

### Inherited properties

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/localized-message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/stack-trace.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/suppressed.html`

## Public constructors

### EmptyResultSetException

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

```
EmptyResultSetException(message: String)
```