Skip to content

Commit ccee7ff

Browse files
committed
native: +of_json_error_to_string
1 parent 1269b38 commit ccee7ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/errors.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,7 @@ let of_json_error_type_mismatch json expected =
125125
emit (show_json_type json);
126126
emit ": ";
127127
emit (show_json_error ~depth:2 ~width:8 json)))
128+
129+
let of_json_error_to_string = function
130+
| Json_error msg -> msg
131+
| Unexpected_variant msg -> "unexpected variant: " ^ msg

0 commit comments

Comments
 (0)