From 9225f17753efa88867f3e36c59a8f8b38bbe07aa Mon Sep 17 00:00:00 2001 From: Kynan Rilee Date: Thu, 14 Dec 2017 23:06:13 -0800 Subject: [PATCH] add a README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..15143e1 --- /dev/null +++ b/README.md @@ -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. +