Giter Club home page Giter Club logo

Comments (7)

JessYanCoding avatar JessYanCoding commented on June 6, 2024 1

我是认为,如果 RxJavaPlugins.setErrorHandler 足够完美,就不需要 RxErrorHandler,RxErrorHandler 的所有功能,RxJavaPlugins.setErrorHandler 这一个 API 即可实现

from rxerrorhandler.

JessYanCoding avatar JessYanCoding commented on June 6, 2024

很久之前深度的使用过,有些需求不能实现

from rxerrorhandler.

hacket avatar hacket commented on June 6, 2024

@JessYanCoding 能举例说明下什么需求实现不了?这是我增加对RxJavaPlugins.setErrorHandler(e -> {})的支持:
add undeliverable error listener

from rxerrorhandler.

JessYanCoding avatar JessYanCoding commented on June 6, 2024

因为很久之前的事了,很多都忘了,记得当时花了一个上午,进行使用,依稀记得,大概是设置 RxJavaPlugins.setErrorHandler 后,只是传入 Consumer 是可以的,但是传入 Observer 会有问题,或者重写 onError 也会有问题,在一些情况下用户的操作,会导致 setErrorHandler 里传入的监听器不回调,大概记不清楚了,你可以自己多试试

from rxerrorhandler.

JessYanCoding avatar JessYanCoding commented on June 6, 2024

另外,感谢你的提交,但是这里还需要提醒一点,如果 RxJavaPlugins.setErrorHandler 是可行的方案,那用户完全可以自行在 App 初始化时,自己调用该接口传入监听器,即可实现全局错误监听,无需通过 RxErrorHandler 再封装一层了,这样感觉有点多此一举,反而更复杂了,因为 RxJavaPlugins.setErrorHandler 使用已经足够简单了,不需要再多引入一个库

from rxerrorhandler.

hacket avatar hacket commented on June 6, 2024

因为很久之前的事了,很多都忘了,记得当时花了一个上午,进行使用,依稀记得,大概是设置 RxJavaPlugins.setErrorHandler 后,只是传入 Consumer 是可以的,但是传入 Observer 会有问题,或者重写 onError 也会有问题,在一些情况下用户的操作,会导致 setErrorHandler 里传入的监听器不回调,大概记不清楚了,你可以自己多试试

嗯,我留意下这个问题。

from rxerrorhandler.

hacket avatar hacket commented on June 6, 2024

另外,感谢你的提交,但是这里还需要提醒一点,如果 RxJavaPlugins.setErrorHandler 是可行的方案,那用户完全可以自行在 App 初始化时,自己调用该接口传入监听器,即可实现全局错误监听,无需通过 RxErrorHandler 再封装一层了,这样感觉有点多此一举,反而更复杂了,因为 RxJavaPlugins.setErrorHandler 使用已经足够简单了,不需要再多引入一个库

是可以单独用,既然封装了这个库,那就把rx异常相关的处理都统一到一个地方不是更好么?

from rxerrorhandler.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.