From c52a82cac61437697010b336906ea17d0d1359c6 Mon Sep 17 00:00:00 2001 From: Maxime Levillain Date: Mon, 14 Oct 2024 18:04:35 +0200 Subject: [PATCH] error type from deriver --- src/ppx/ppx_common.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ppx/ppx_common.ml b/src/ppx/ppx_common.ml index 3a3b9f6..263ad05 100644 --- a/src/ppx/ppx_common.ml +++ b/src/ppx/ppx_common.ml @@ -654,7 +654,8 @@ let deriver_str_gen kind meth ~loc ~path:_ (rec_flag, l) path input output error hide = Option.value ~default:options.hide hide; input_example = Option.value ~default:options.input_example input_example; output_example = Option.value ~default:options.output_example output_example; - debug; nargs + debug; nargs; + error_type = (match errors with None -> options.error_type | Some _ -> [%type: _]); } in let s, _, options = service_value ~meth ~loc ~options ?name:sname ~parse_options:false (PStr []) in match kind with