Skip to content

Commit

Permalink
Add default error handler for Interactors
Browse files Browse the repository at this point in the history
  • Loading branch information
moezbhatti committed Jun 9, 2018
1 parent bd6c5ca commit c283677
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions domain/src/main/java/interactor/Interactor.kt
Expand Up @@ -24,8 +24,9 @@ import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable
import io.reactivex.rxkotlin.plusAssign
import io.reactivex.schedulers.Schedulers
import timber.log.Timber

abstract class Interactor<in Params>: Disposable {
abstract class Interactor<in Params> : Disposable {

private val disposables: CompositeDisposable = CompositeDisposable()

Expand All @@ -36,7 +37,7 @@ abstract class Interactor<in Params>: Disposable {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnComplete(onComplete)
.subscribe()
.subscribe({}, Timber::w)
}

override fun dispose() {
Expand Down

0 comments on commit c283677

Please sign in to comment.