-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handler panic reporting (#145)
Stack traces for handler panics were lost, making it hard to determine where the panic actually happened. Now, stack traces are captured by a special error type so that handlers can print them. By default, nothing actually changes, but I plan to extend the default configuration of go-baseapp so that these errors are formatted with stack traces in logs. I copied the error code from my implementation in `bluekeyes/hatpear` so that they'll share the same interface. The `pkg/errors` package has a similar interface, but uses package-specific types. Using standard library types seemed preferrable, even though we have a dependency on `pkg/errors` already.
- Loading branch information
Showing
2 changed files
with
81 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters