summaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2022-08-15 21:25:06 -0600
committerLuke Shumaker <lukeshu@datawire.io>2022-08-16 00:05:37 -0600
commit67b78f25f76b8ca43d837fb8055ca8e2b06c7d02 (patch)
tree517343e316a24cb2f07b16d23ccbf04570f4ce7c /errors.go
parent6476b9ae7019bedd9324786ff47bc25693e01b60 (diff)
Get borrowed_scanner_test.go passing [ci-skip]
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)
+}