Skip to content

Commit

Permalink
give context to GitErrors when showing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolewski committed Sep 30, 2015
1 parent 92670a9 commit 28e854b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/libgit2/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ immutable GitError <: Exception
code::Code
msg::AbstractString
end
Base.show(io::IO, err::GitError) = print(io, "[Code:$(err.code), Class:$(err.class)]: $(err.msg)")
Base.show(io::IO, err::GitError) = print(io, "GitError(Code:$(err.code), Class:$(err.class), $(err.msg))")

This comment has been minimized.

Copy link
@tkelman

tkelman Sep 30, 2015

Contributor

I think this also needs a trailing newline

This comment has been minimized.

Copy link
@jakebolewski

jakebolewski Sep 30, 2015

Author Member

the newline gets added when the error is printed

This comment has been minimized.

Copy link
@tkelman

tkelman Sep 30, 2015

Contributor

there are a few cases in the CI output where a newline is missing, not sure exactly where it should be though


function last_error()
err = ccall((:giterr_last, :libgit2), Ptr{ErrorStruct}, ())
Expand Down

0 comments on commit 28e854b

Please sign in to comment.