summaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/errors.go b/errors.go
index cee82f7..2d8820e 100644
--- a/errors.go
+++ b/errors.go
@@ -137,3 +137,16 @@ func (e *EncodeMethodError) Error() string {
}
func (e *EncodeMethodError) Unwrap() error { return e.Err }
+
+// reencode errors /////////////////////////////////////////////////////////////////////////////////
+
+// A *ReEncodeSyntaxError is returned from ReEncoder's methods if
+// there is a syntax error in the input.
+type ReEncodeSyntaxError struct {
+ Err error
+ Offset int64
+}
+
+func (e *ReEncodeSyntaxError) Error() string {
+ return fmt.Sprintf("json: syntax error at input byte %v: %v", e.Offset, e.Err)
+}