GithubHelp home page GithubHelp logo

Comments (6)

cyphar avatar cyphar commented on July 19, 2024

#97 is my implementation of this.

from errors.

davecheney avatar davecheney commented on July 19, 2024

from errors.

cyphar avatar cyphar commented on July 19, 2024

from errors.

loren-osborn avatar loren-osborn commented on July 19, 2024

@davecheney, I’m mostly thinking out loud here, and haven’t thought as far as an API yet, but I’m wondering if a cascading priority makes sense:

  • If the caller chooses to render the error with or without a stack trace explicitly, that is always honored.
  • If the caller uses default error rendering, but the error itself (based on options when the error was created) prefers to be rendered with or without a stack trace explicitly, that is how the error is rendered.
  • If neither the caller nor the error specify if they want a stack trace, a global default, (similar to #96 / #97) determines if the error renders a stack trace.

As I indicated above, these are just ideas I had reviewing old PRs. I’d be interested to hear your opinions.

from errors.

davecheney avatar davecheney commented on July 19, 2024

Thank you for your comment. My position has not changed since my last comment.

from errors.

cyphar avatar cyphar commented on July 19, 2024

Within umoci I've just decided to use %+v if debugging is enabled. This works for me since everything goes through a single CLI library, but maybe others want this. Closing.

from errors.

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.