summaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/errors.go b/errors.go
index a5a4080..cee82f7 100644
--- a/errors.go
+++ b/errors.go
@@ -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