caml_tex: also provide error output on Lexing errors
I hit a Lexer error by mistakenly closing an environment with \end{caml_example*}{verbatim} instead of \end{caml_example*} and caml_tex would not quote the wrong input or indicate at which line the error was, which makes debugging painful.master
parent
14f29e0d65
commit
549ec6536b
|
@ -196,7 +196,9 @@ module Toplevel = struct
|
|||
let str =
|
||||
Ast_helper.[Str.modtype @@ Mtd.mk ~typ:(Mty.signature sign) name] in
|
||||
Ptop_def str
|
||||
with Syntaxerr.Error _ -> raise (Phrase_parsing s)
|
||||
with
|
||||
| Lexer.Error _ | Syntaxerr.Error _ ->
|
||||
raise (Phrase_parsing s)
|
||||
|
||||
let take x = let r = !x in x := []; r
|
||||
|
||||
|
|
Loading…
Reference in New Issue