You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 8, 2020. It is now read-only.
due to connection problems.
Where could I override onError() to catch this?
And where does it get thrown?
I can catch it only grom uncaught Exception handler in main class...
The text was updated successfully, but these errors were encountered:
It seems that unpredictable network errors (like sudden connection loss) need to be handled in exta global handler, that is part of RxJava package. Has anyone worked on that?
RxJavaPlugins.setErrorHandler(e -> {
if (einstanceofUndeliverableException) {
e = e.getCause();
}
if ((einstanceofIOException) || (einstanceofSocketException)) {
// fine, irrelevant network problem or API that throws on cancellationreturn;
}
if (einstanceofInterruptedException) {
// fine, some blocking code was interrupted by a dispose callreturn;
}
if ((einstanceofNullPointerException) || (einstanceofIllegalArgumentException)) {
// that's likely a bug in the applicationThread.currentThread().getUncaughtExceptionHandler()
.handleException(Thread.currentThread(), e);
return;
}
if (einstanceofIllegalStateException) {
// that's a bug in RxJava or in a custom operatorThread.currentThread().getUncaughtExceptionHandler()
.handleException(Thread.currentThread(), e);
return;
}
Log.warning("Undeliverable exception received, not sure what to do", e);
});
Hello Gentlemen,
I'm getting
Stack Trace: io.reactivex.exceptions.UndeliverableException: java.net.UnknownHostException: ws.pusherapp.com
due to connection problems.
Where could I override onError() to catch this?
And where does it get thrown?
I can catch it only grom uncaught Exception handler in main class...
The text was updated successfully, but these errors were encountered: