Skip to content

Commit 282ad39

Browse files
committed
Improve error message
1 parent 01f74af commit 282ad39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/js_of_ocaml/json.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ let input_reviver =
140140

141141
let unsafe_input s =
142142
match Sys.backend_type with
143-
| Other "wasm_of_ocaml" -> failwith "Json.unsafe_input: not implemented"
143+
| Other "wasm_of_ocaml" ->
144+
failwith
145+
"Json.unsafe_input: not implemented (and not planned) in the Wasm backend as the \
146+
inverse of `output` is not implementable"
144147
| _ -> json##parse_ s input_reviver
145148

146149
class type obj = object

0 commit comments

Comments
 (0)