Skip to content

Commit

Permalink
update stack trace note
Browse files Browse the repository at this point in the history
fixes #11
  • Loading branch information
Southclaws authored Nov 20, 2022
1 parent 873e235 commit 2c1610a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if err != nil {
}
```

What this gives you is basic stack traces. The philosophy behind stack traces provided by Fault is that you only care about relevant code locations. You do not need `runtime/proc.go` in your stack traces unless you're actually working on the Go compiler or some crazy low level tooling. A fault stack trace looks like this:
What this gives you is basic stack traces. The philosophy behind stack traces provided by Fault is that you only care about relevant code locations. You do not need `runtime/proc.go` in your stack traces unless you're actually working on the Go compiler or some crazy low level tooling. A fault stack trace looks like this when formatted with `%+v`:

```
stdlib sentinel error
Expand All @@ -44,7 +44,7 @@ failed to call function
/Users/southclaws/Work/fault/fault_test.go:52
```

And of course all of this information is accessible in a structured way so you can serialise it how you want for your logging stack of choice.
And of course all of this information is accessible in a structured way so you can serialise it how you want for your logging stack of choice. Fault aims to be unopinionated about presentation.

But what if you want to add context? With pkg/errors and similar libraries, you often use `errors.Wrap(err, "failed to do something")` to add a bit of context to a wrapped error.

Expand Down

0 comments on commit 2c1610a

Please sign in to comment.