diff options
Diffstat (limited to 'errors.go')
-rw-r--r-- | errors.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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) +} |