Giter Site home page Giter Site logo

Comments (3)

XedinUnknown avatar XedinUnknown commented on June 9, 2024

This puts burden on consumers to iterate through the stack trace in hopes of finding the actual reason for a failure. That process alone is sketchy at best, as the consumer would need to somehow know how long they should recurse into the stack trace in order to obtain a meaningful error message.

You are referring to programmatic access to the inner exception with the meaningful message, right?

from transient-cache.

mecha avatar mecha commented on June 9, 2024

Yes, algorithmically trying to deduce which inner exception has the most meaningful message.

from transient-cache.

mecha avatar mecha commented on June 9, 2024

I have another case where the exception messages are misleading. This one in particular is causing us a lot of issues.


At seemingly random times, CachePool::set() seems to fail with the exception:

Could not write value for key "..." to cache

This exception is thrown here.

It's pretty evident that this is originating from the setTransient() method, seeing as how it's the only thing inside the try..catch block. The issue comes when we look deeper into that method.

The setTransient() method, can actually throw two different types of exceptions:

The method originally in question, CachePool::set() catches RuntimeException, but will catch both of these (since RangeException extends RuntimeException). And in doing so it re-throws a completely new exception with a completely vague message.

And because we simply report these "soft" non-critical errors as a toast popup to the user, we have no idea which of the two exceptions is actually being thrown.


Expected a PR today :) These exceptions re-throws are getting out of hand.

from transient-cache.

Related Issues (9)

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.