edgedb-go icon indicating copy to clipboard operation
edgedb-go copied to clipboard

add custom formatting to errors

Open fmoor opened this issue 4 years ago • 1 comments

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 avatar Dec 31 '20 17:12 fmoor

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.

fmoor avatar Mar 22 '21 17:03 fmoor