Skip to content

Commit 0292489

Browse files
authored
Clarified error types
Tracked jmespath/jmespath.site/pull/116.
1 parent aa35cb8 commit 0292489

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

GRAMMAR.ABNF

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
;; Implementations can map the corresponding JSON types to their language equivalent. For example, a JSON null could map to
3434
;; None in python, and nil in ruby and go.
3535
;;
36+
;; # Errors
37+
;;
38+
;; Errors may be raised during the JMEspath evaluation process. How and when errors are raised is implementation specific,
39+
;; but implementations should indicate to the caller when errors have occurred.
40+
;;
41+
;; The following errors are defined:
42+
;;
43+
;; - `invalid-arity` is raised when an invalid number of function arguments is encountered during the evaluation process.
44+
;; - `invalid-type` is raised when an invalid type is encountered during the evaluation process.
45+
;; - `invalid-value` is raised when an invalid value is encountered during the evaluation process.
46+
;; - `not-a-number` is raised when arithmetic expressions overflow.
47+
;; - `unknown-function` is raised when an unknown function is encountered during the evaluation process.
48+
;;
3649
;; # Grammar
3750
;;
3851
;; JMESPath grammar is specified using ABNF, as described in RFC4234

0 commit comments

Comments
 (0)