Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Structured Errors for Go

Errors are great, but we need to know where they happened and why.
This library defines functions and custom error types for annotating errors with additional context.
It's like customizable stacktraces.

The primary error type, `ErrorWithContext`, attaches a stack of context messages to a base error.
When "re-throwing" an error, use `ContextualizeErrorf` or one of the `*ContextErrorf` functions
to push a message onto the context stack. Also included: convenience methods for common errors and contexts.