From d344afbab0222fc634613c5041f3d2cdfc702f84 Mon Sep 17 00:00:00 2001 From: Sara Tansey Date: Sat, 17 Aug 2019 18:27:01 -0400 Subject: [PATCH] Explain how messages get combined It was unclear to me why we needed to add messages at every stack layer. I think this sentence might have saved me some time. --- oops/doc.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oops/doc.go b/oops/doc.go index faa64b1..a90400e 100644 --- a/oops/doc.go +++ b/oops/doc.go @@ -28,6 +28,8 @@ // stacktrace. To keep your stacktraces as detailed as possible, it is best to // call oops.Wrapf every time you return an error. If you have no context to // add, you can always pass an empty format string to oops.Wrapf. +// Wrapping an error multiple times in the same call stack will retain the most +// detailed stacktrace, and annotate each function name with it's messages. // // When adding oops to an existing package or program, you might have // intermediate functions that don't yet call oops.Wrapf when returning errors.