new dependency
Tim Penhey
tim.penhey at canonical.com
Thu Feb 6 08:04:35 UTC 2014
On 06/02/14 14:14, Nate Finch wrote:
> One thing I noticed was that it looked like it wasn't generating an
> actual stack trace ever. I think that's pretty critical to knowing how
> you got to the spot where you got the error.
I made the default behaviour of the error message to match exactly what
we have now.
There is, however, an extra method that you can use to get the traceback
for logging purposes.
Also, out of respect for Roger's errgo package, this is being renamed
and moved under the juju organisation. I'm going to submit a branch
shortly that will move the imports and names, but the actual repo is
there now. I also had to fix some things for gccgo.
http://github.com/juju/arrar
The name was changed to kinda fit "annotated error", but also fits if
you think of a pirate trying to say "error"
arrar.DetailedErrorStack(err, arrar.Default) will return the traceback
that shows the full path, with each location on a different line. The
second parameter allows different prefixes so you could indent it if you
like, and also to control the number of path elements in the filename
that you are interested in.
I plan to write something more about that will be put into the README.md
that will show more usage.
Tim
> On Feb 5, 2014 7:29 PM, "Martin Packman" <martin.packman at canonical.com
> <mailto:martin.packman at canonical.com>> wrote:
>
> On 04/02/2014, Tim Penhey <tim.penhey at canonical.com
> <mailto:tim.penhey at canonical.com>> wrote:
> >
> > Docs need a little work.
>
> Can you give us an inspirational example of an error message made
> clearer at least?
>
> I know Roger has hacked on something along these lines in the past,
> I'm curious to hear his thoughts on your stab at tracebacks versus the
> approach he tried.
>
> Martin
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com <mailto:Juju-dev at lists.ubuntu.com>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
More information about the Juju-dev
mailing list