From 282ad3991019fe335924b8f74a527abaf048d923 Mon Sep 17 00:00:00 2001 From: Olivier Nicole Date: Mon, 26 Aug 2024 11:19:57 +0200 Subject: [PATCH] Improve error message --- lib/js_of_ocaml/json.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/js_of_ocaml/json.ml b/lib/js_of_ocaml/json.ml index 541f6fc5c2..4d9a88efc7 100644 --- a/lib/js_of_ocaml/json.ml +++ b/lib/js_of_ocaml/json.ml @@ -140,7 +140,10 @@ let input_reviver = let unsafe_input s = match Sys.backend_type with - | Other "wasm_of_ocaml" -> failwith "Json.unsafe_input: not implemented" + | Other "wasm_of_ocaml" -> + failwith + "Json.unsafe_input: not implemented (and not planned) in the Wasm backend as the \ + inverse of `output` is not implementable" | _ -> json##parse_ s input_reviver class type obj = object