Include async stacktraces even on errors

This commit is contained in:
NerdNumber9 2019-04-20 13:52:30 -04:00
parent a978cb90e8
commit 0814439886

View File

@ -30,7 +30,7 @@ fun Call.asObservableWithAsyncStacktrace(): Observable<Pair<Exception, Response>
subscriber.onNext(asyncStackTrace to response) subscriber.onNext(asyncStackTrace to response)
subscriber.onCompleted() subscriber.onCompleted()
} }
} catch (error: Exception) { } catch (error: Throwable) {
if (!subscriber.isUnsubscribed) { if (!subscriber.isUnsubscribed) {
subscriber.onError(error.withRootCause(asyncStackTrace)) subscriber.onError(error.withRootCause(asyncStackTrace))
} }