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

add custom formatting to errors #55

Open
fmoor opened this issue Dec 31, 2020 · 1 comment
Open

add custom formatting to errors #55

fmoor opened this issue Dec 31, 2020 · 1 comment

Comments

@fmoor
Copy link
Member

fmoor commented Dec 31, 2020

One nice feature of golang's most popular error library pkg/errors is custom formatting for printing errors. This is something that would improve the developer experience by associating stack traces with errors. We should consider adding this type of functionality.

@fmoor
Copy link
Member Author

fmoor commented Mar 22, 2021

2 cons for this idea

  1. The user has to know that they need to print the error with a special formatting option.
  2. Collecting the stack trace is a fairly expensive operation and could significantly impact performance if error generation is in an application's hot path.

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