diff --git a/pkg.go b/pkg.go index a74ab66..a34fc7f 100644 --- a/pkg.go +++ b/pkg.go @@ -9,7 +9,7 @@ import ( ) type Error struct { - err error + Wrapped error File string Line int Data interface{} @@ -47,7 +47,7 @@ func (wrapped Error) Error() string { "[%s:%d] %s", wrapped.File, wrapped.Line, - wrapped.err.Error(), + wrapped.Wrapped.Error(), ) } @@ -56,7 +56,7 @@ func create(err error, data interface{}) error { file = file[baseDirLength+1:] wrapped := Error{ - err: err, + Wrapped: err, File: file, Line: line, Data: data,