ignore completion errors from invalid cmis

This commit is contained in:
Jeremie Dimino 2014-08-18 11:27:03 +01:00
parent 1541f25520
commit fac09516fc
1 changed files with 6 additions and 0 deletions

View File

@ -1078,3 +1078,9 @@ let complete ~syntax ~phrase_terminator ~input =
(start, List.map (fun w -> (w, "")) (lookup id (String_set.elements (global_fields ())))) (start, List.map (fun w -> (w, "")) (lookup id (String_set.elements (global_fields ()))))
| Some (Field, Some longident, start, id) -> | Some (Field, Some longident, start, id) ->
(start, List.map (fun w -> (w, "")) (lookup id (String_set.elements (fields_of_module longident)))) (start, List.map (fun w -> (w, "")) (lookup id (String_set.elements (fields_of_module longident))))
let complete ~syntax ~phrase_terminator ~input =
try
(complete ~syntax ~phrase_terminator ~input : int * (string * string) list)
with Cmi_format.Error _ ->
(0, [])