Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling the rendering of the cause chain #191

Closed
LukeMathWalker opened this issue Aug 7, 2022 · 1 comment
Closed

Allow disabling the rendering of the cause chain #191

LukeMathWalker opened this issue Aug 7, 2022 · 1 comment

Comments

@LukeMathWalker
Copy link
Contributor

Hi!
I have been using miette for a compiler-like project recently - I have been loving it so far, but I am facing a dilemma.

I'd love to have the fancy-like features for the user-facing reports, but I don't want to expose my users to the cause chain of the top-level error - it would leak implementation details that they should not care about.
As far as I can see, there is no way to suppress the rendering of the cause chain; I can either render the top-level error message (with no source/labels/helps) via Display or I can get the rich error but I end up leaking lower-level error details via Debug.

Would adding a new knob to MietteHandlerOpts be a welcomed addition?

@LukeMathWalker
Copy link
Contributor Author

LukeMathWalker commented Aug 7, 2022

It turns out it was quite straight-forward to sketch it out, so I submitted a PR. Feel free to reject it if you don't think this is a desirable configuration option.

@zkat zkat closed this as completed in b9ea587 Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant