[OCaml] Org mode parser.
fix catch specific Menhir error instead of all exceptions
The bare 'with _' handler would swallow fatal exceptions like Out_of_memory or Stack_overflow. Catch only Inline_parser.Error which is what Menhir raises on parse failures.
lib/parse_bridge.ml
@@ -85,6 +85,6 @@
85
85
in
86
86
try
87
87
Inline_parser.inline_content token_fun dummy_lexbuf
88
Removed:
with _ ->
88
Added:
with Inline_parser.Error ->
89
89
(* Fallback: if inline parsing fails, return plain text *)
90
90
[Ast.Plain input]