MCPcopy Index your code
hub / github.com/expr-lang/expr / ExampleEval_runtime_error

Function ExampleEval_runtime_error

expr_test.go:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func ExampleEval_runtime_error() {
42 _, err := expr.Eval(`map(1..3, {1 % (# - 3)})`, nil)
43 fmt.Print(err)
44
45 // Output: runtime error: integer divide by zero (1:14)
46 // | map(1..3, {1 % (# - 3)})
47 // | .............^
48}
49
50func ExampleCompile() {
51 env := map[string]any{

Callers

nothing calls this directly

Calls 2

EvalFunction · 0.92
PrintMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…