diff options
Diffstat (limited to 'errors.go')
-rw-r--r-- | errors.go | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -6,10 +6,21 @@ package lowmemjson import ( "encoding/json" + "errors" "fmt" "reflect" "strings" - "errors" +) + +// parser errors /////////////////////////////////////////////////////////////////////////////////// + +type ParseError struct { + Err error + Offset int64 +} + +var ( + ErrParserExceededMaxDepth = errors.New("exceeded max depth") ) // low-level decode errors ///////////////////////////////////////////////////////////////////////// @@ -65,8 +76,6 @@ func (e *DecodeTypeError) Error() string { func (e *DecodeTypeError) Unwrap() error { return e.Err } -var ErrDecodeExceededMaxDepth = errors.New("exceeded max depth") - // high-level decode errors //////////////////////////////////////////////////////////////////////// // A *DecodeArgumentError is returned from Decode if the argument is |