Git Product home page Git Product logo

Comments (3)

FlixCoder avatar FlixCoder commented on May 31, 2024 4

Oh I didn't know there is extended Display wow :D Ok that solves it yeah, thanks!

from hash.

TimDiekmann avatar TimDiekmann commented on May 31, 2024

Hi @FlixCoder and thanks for your issue, glad you like error-stack! 🙂

The behavior you described is expected behavior. To Display an error, error-stack uses the same behavior as anyhow:

  • Display only prints the latest context/error: println!("Error: {err}") will print "Error: Error B"
  • extended Display prints all contexts: println!("Error: {err:#}") will print "Error: Error B: Error A"
  • Debug prints the full stack of errors: println!("Error: {err:?}") will print
     Error: Error B
     ├╴ main.rs:18:25
     │
     ╰─▶ Error A
         ├╴ main.rs:23:5
         ╰╴ backtrace with 15 frames (1)
    
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
     backtrace no. 1
     [redacted]
    

Does this solve your issue?


I attach information like result.attach(Retryable::Yes)

That's a really cool way to utilize attachments! 🎉

from hash.

TheAlgorythm avatar TheAlgorythm commented on May 31, 2024

It would be cool if there were a a pretty printed version of the the extended version. In contrast to Debug it shouldn't include the locations and backtrace as it is to much Information for an user.

The example from the README could look like this:

could not parse configuration file
├╴could not read file "test.txt"
├╴1 additional opaque attachment
│
╰─▶ No such file or directory (os error 2)

from hash.

Related Issues (20)

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.