Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Introduce Stacktrace and Frame #37

Merged
merged 2 commits into from
Jun 7, 2016
Merged

Introduce Stacktrace and Frame #37

merged 2 commits into from
Jun 7, 2016

Commits on Jun 7, 2016

  1. 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.
    davecheney committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    06410e9 View commit details
    Browse the repository at this point in the history
  2. Responding to review feedback.

    - Handle possible nil in `runtime.FuncForPC`
    - Refactor trimGOPATH to work on strings, not funcs and pc's
    - Fix incorrect handling of `%n` for methods.
    davecheney committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    a4b4f75 View commit details
    Browse the repository at this point in the history