Giter VIP home page Giter VIP logo

Comments (13)

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024 1

It works!!! To be more specific, it work exactly what I have been hoping for. From now on, I no longer have to follow the observable stream to hunt the myth of "Callable returned null" or any other error info. This is too awesome to be true.

from rxjava2debug.

akaita avatar akaita commented on June 18, 2024

It looks like you have it disabled: https://github.com/TonyTangAndroid/RxJava2DebugIssueDemo/blob/master/app/src/main/java/com/github/tonytangandroid/rxjava2debugdemo/App.java

//        RxJava2Debug.enableRxJava2AssemblyTracking();

Obvious question: did you try uncommenting it?

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

Yes. I have tried to disable or enable it in both use case hoping to generate the different stack. But it is turned out to be the same.

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

Hold on. I think I know the reason.

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

Nope. It still does not work as expected. Previously, I made a silly mistake. I did not registered the Application in AndroidManifest.xml.

I have just registered it and enabled it and I still get the same error.

from rxjava2debug.

akaita avatar akaita commented on June 18, 2024

Ok. Now I read the stacktrace you posted.

Try using this: RxJava2Debug.enableRxJava2AssemblyTracking(new String[]{"com.github.tonytangandroid"});

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

I have just tried it. Still no luck here.

from rxjava2debug.

akaita avatar akaita commented on June 18, 2024

Oh, you are consuming the error:

 new Consumer<Throwable>() {
            @Override
            public void accept(@NonNull Throwable throwable) throws Exception {
                throwable.printStackTrace();
                tvResult.setText(throwable.getMessage());
            }
        },

If you already consume the error, you already have the necessary information to fix the issue; the lib would only show you information you already know about.
The lib will improve the StackTrace of Unhandled exceptions.

What additional info did you expect to receive?

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

Aha, it is. After the error consumer has been removed AND removed the new String[]{"com.github.tonytangandroid"} from RxJava2Debug.enableRxJava2AssemblyTracking(new String[]{"com.github.tonytangandroid"});, it works!

Please be noted that I have to remove new String[]{"com.github.tonytangandroid"} and keep

RxJava2Debug.enableRxJava2AssemblyTracking();

to see the expected stack information.

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

Before your explanation about error Consumer, I had expected in a wrong way that, even I have consumer to address the throwable, but as long as I print the stack trace of the throwable, it would still show the root cause of the error. This would be more helpful.

And in my project, I have to add an error consumer to address the unhandled case globally. However, this makes me really difficult to track down issues like because the stack trace does not provide any help. And that's the reason why I come across to this repository.

Assume that I still have to consume the error in my subscriber, is there any other way to still see the root cause of any exception as long as the stack trace is printed out?

from rxjava2debug.

akaita avatar akaita commented on June 18, 2024

I just found why the filtering wasn't working. The filtering won't work when you user UI Thread for all tasks. I'll issue a fix this weekend.

I didn't think about your use case. I can easily modify the lib to offer you something like RxJava2Debug.getEnhancedStackTrace(Throwable t) 🤔
Yeah, this weekend will also be enough for that 👍

from rxjava2debug.

TonyTangAndroid avatar TonyTangAndroid commented on June 18, 2024

Awesome! Thank you very much for all your time, patience and guidance.

from rxjava2debug.

akaita avatar akaita commented on June 18, 2024

Try out 1.2.0 👍

from rxjava2debug.

Related Issues (14)

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.