aboutsummaryrefslogtreecommitdiff
path: root/ide/xmlprotocol.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ide/xmlprotocol.ml')
-rw-r--r--ide/xmlprotocol.ml9
1 files changed, 5 insertions, 4 deletions
diff --git a/ide/xmlprotocol.ml b/ide/xmlprotocol.ml
index d94cb0f3ef..79509fe021 100644
--- a/ide/xmlprotocol.ml
+++ b/ide/xmlprotocol.ml
@@ -795,10 +795,11 @@ let to_message xml = match xml with
Message(to_message_level lvl, to_option to_loc xloc, to_richpp content)
| x -> raise (Marshal_error("message",x))
-let is_message = function
- | Xml_datatype.Element ("message", [], [lvl; xloc; content]) ->
- Some (to_message_level lvl, to_option to_loc xloc, to_richpp content)
- | _ -> None
+let is_message xml =
+ try begin match to_message xml with
+ | Message(l,c,m) -> Some (l,c,m)
+ | _ -> None
+ end with | Marshal_error _ -> None
let to_feedback_content = do_match "feedback_content" (fun s a -> match s,a with
| "addedaxiom", _ -> AddedAxiom