File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ module Error = struct
6262 let print_internal_error ~debug ~quiet fmt e =
6363 let s =
6464 match e with
65+ | `Cannot_parse (Parse_with_comments. Warning50 _ ) ->
66+ " generating invalid comment attachment"
6567 | `Cannot_parse _ -> " generating invalid ocaml syntax"
6668 | `Ast_changed -> " ast changed"
6769 | `Comment _ -> " comment changed"
@@ -72,6 +74,12 @@ module Error = struct
7274 | `Comment x when not quiet -> Cmt. pp_error fmt x
7375 | `Cannot_parse ((Syntaxerr. Error _ | Lexer. Error _ ) as exn ) ->
7476 if debug then Location. report_exception fmt exn
77+ | `Cannot_parse (Parse_with_comments. Warning50 _ ) ->
78+ (* Printing the warning is not useful because it doesn't reference
79+ the right filename *)
80+ ()
81+ | `Cannot_parse exn ->
82+ if debug then Format. fprintf fmt " %s" (Stdlib.Printexc. to_string exn )
7583 | `Warning50 (l , w ) -> if debug then Warning. print_warning l w
7684 | _ -> ()
7785
You can’t perform that action at this time.
0 commit comments