aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/ulreq_decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/protocol/packp/ulreq_decode.go')
-rw-r--r--plumbing/protocol/packp/ulreq_decode.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/plumbing/protocol/packp/ulreq_decode.go b/plumbing/protocol/packp/ulreq_decode.go
index 541a077..bcd642d 100644
--- a/plumbing/protocol/packp/ulreq_decode.go
+++ b/plumbing/protocol/packp/ulreq_decode.go
@@ -45,8 +45,12 @@ func (d *ulReqDecoder) Decode(v *UploadRequest) error {
// fills out the parser stiky error
func (d *ulReqDecoder) error(format string, a ...interface{}) {
- d.err = fmt.Errorf("pkt-line %d: %s", d.nLine,
- fmt.Sprintf(format, a...))
+ msg := fmt.Sprintf(
+ "pkt-line %d: %s", d.nLine,
+ fmt.Sprintf(format, a...),
+ )
+
+ d.err = NewErrUnexpectedData(msg, d.line)
}
// Reads a new pkt-line from the scanner, makes its payload available as