3 Commits

Author SHA1 Message Date
Dave Cheney
19140ea8c4 Remove deprecated Location interface 2016-06-08 19:34:10 +10:00
Dave Cheney
e23d6edfd2 extract funcname helper, and add test 2016-06-08 19:21:37 +10:00
Dave Cheney
3cdd33210d Introduce Stacktrace and Frame (#37)
* Introduce Stacktrace and Frame

This PR is a continuation of a series aimed at exposing the stack trace
information embedded in each error value. The secondary effect is to
deprecated the `Fprintf` helper.

Taking cues from from @chrishines' `stack` package this PR introduces a
new interface `Stacktrace() []Frame` and a `Frame` type, similar in
function to the `runtime.Frame` type (although lacking its iterator
type). Each `Frame` implemnts `fmt.Formatter` allowing it to print
itself.

The older `Location` interface is still supported but also deprecated.
2016-06-07 14:23:05 +10:00