Skip to content

Commit

Permalink
Don't emmit errors if the chain is disposed
Browse files Browse the repository at this point in the history
This commit fixes #56

Signed-off-by: Rafael Chagas <[email protected]>
  • Loading branch information
rtchagas committed Mar 1, 2020
1 parent 408c6fb commit 017bcee
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GoogleMapsRepository constructor(
emitter.onSuccess(listOf())
}
else {
emitter.onError(task.exception ?: Exception("No places for you..."))
emitter.tryOnError(task.exception ?: Exception("No places for you..."))
}
}
}
Expand Down Expand Up @@ -102,7 +102,7 @@ class GoogleMapsRepository constructor(
val bitmap = it.bitmap
emitter.onSuccess(bitmap)
}.addOnFailureListener {
emitter.onError(it)
emitter.tryOnError(it)
}
}
}
Expand Down Expand Up @@ -142,7 +142,7 @@ class GoogleMapsRepository constructor(
emitter.onSuccess(it.place)
}
.addOnFailureListener {
emitter.onError(it)
emitter.tryOnError(it)
}
}
}
Expand Down

0 comments on commit 017bcee

Please sign in to comment.