11 Commits

Author SHA1 Message Date
Dave Cheney
f22595b332 fix Stacktrace example 2016-06-07 18:47:44 +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
Santiago Corredoira Lascaray
7a0abd8f63 Add Errorf (#14) 2016-04-30 08:38:57 +10:00
Umair Idris
9a179122f1 Add Wrapf 2016-04-25 00:31:25 -04:00
Dave Cheney
a15b27b2bf fix second errors.New example 2016-04-22 20:15:46 +09:00
Dave Cheney
258d1265c4 skip tests on tip 2016-04-22 19:19:39 +09:00
Dave Cheney
4df5f1c4b6 added example, fixed tests 2016-04-22 19:13:47 +09:00
Dave Cheney
a7f2be0bfe added godoc 2016-04-22 19:10:04 +09:00
Dave Cheney
f5db181ac2 more examples 2016-04-22 17:46:16 +09:00
Dave Cheney
b402999421 more examples 2016-04-22 17:40:16 +09:00
Dave Cheney
1e412a1049 Added New and Cause methods. 2015-12-27 15:19:49 +01:00