|
|
@ -13,6 +13,9 @@ import com.crashlytics.android.Crashlytics; |
|
|
|
import com.zoyi.channel.plugin.android.ChannelIO; |
|
|
|
|
|
|
|
import io.fabric.sdk.android.Fabric; |
|
|
|
import io.reactivex.exceptions.UndeliverableException; |
|
|
|
import io.reactivex.plugins.RxJavaPlugins; |
|
|
|
import retrofit2.HttpException; |
|
|
|
|
|
|
|
import static com.gmeremit.online.gmeremittance_native.base.PrefKeys.USER_PREFERRED_COUNTRY_CODE; |
|
|
|
|
|
|
@ -37,6 +40,14 @@ public class GmeApplication extends MultiDexApplication { |
|
|
|
Fabric.with(this, new Crashlytics()); |
|
|
|
} |
|
|
|
|
|
|
|
RxJavaPlugins.setErrorHandler(throwable -> { |
|
|
|
if (throwable instanceof UndeliverableException && throwable.getCause() instanceof HttpException) { |
|
|
|
return; // ignore BleExceptions as they were surely delivered at least once |
|
|
|
} |
|
|
|
// add other custom handlers if needed |
|
|
|
throw new RuntimeException("Unexpected Throwable in RxJavaPlugins error handler", throwable); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (stringExtractor == null) |
|
|
|
stringExtractor = new StringExtractor(getResources()); |
|
|
|