edgedb-go
edgedb-go copied to clipboard
add custom formatting to errors
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.
2 cons for this idea
- The user has to know that they need to print the error with a special formatting option.
- Collecting the stack trace is a fairly expensive operation and could significantly impact performance if error generation is in an application's hot path.