- match rendering_window#output#get_selection with
- Some node ->
- let xpath =
- ((node : Gdome.element)#getAttributeNS
- (*CSC: OCAML DIVERGE
- ((element : G.element)#getAttributeNS
- *)
- ~namespaceURI:helmns
- ~localName:(G.domString "xref"))#to_string
- in
- if xpath = "" then assert false (* "ERROR: No xref found!!!" *)
- else
- begin
- try
- match !current_cic_infos with
- Some (ids_to_terms, ids_to_father_ids) ->
- let id = xpath in
- if L.to_sequent id ids_to_terms ids_to_father_ids then
- refresh_proof rendering_window#output ;
- refresh_sequent rendering_window#proofw
- | None -> assert false (* "ERROR: No current term!!!" *)
- with
- e -> print_endline ("Error: " ^ Printexc.to_string e) ; flush stdout
- end
- | None -> assert false (* "ERROR: No selection!!!" *)
+ let outputhtml = (rendering_window#outputhtml : GHtml.xmhtml) in
+ match rendering_window#output#get_selection with
+ Some node ->
+ let xpath =
+ ((node : Gdome.element)#getAttributeNS
+ (*CSC: OCAML DIVERGE
+ ((element : G.element)#getAttributeNS
+ *)
+ ~namespaceURI:helmns
+ ~localName:(G.domString "xref"))#to_string
+ in
+ if xpath = "" then assert false (* "ERROR: No xref found!!!" *)
+ else
+ begin
+ try
+ match !current_cic_infos with
+ Some (ids_to_terms, ids_to_father_ids) ->
+ let id = xpath in
+ if L.to_sequent id ids_to_terms ids_to_father_ids then
+ refresh_proof rendering_window#output ;
+ refresh_sequent rendering_window#proofw
+ | None -> assert false (* "ERROR: No current term!!!" *)
+ with
+ e ->
+ output_html outputhtml
+ ("<h1 color=\"red\">" ^ Printexc.to_string e ^ "</h1>")
+ end
+ | None -> assert false (* "ERROR: No selection!!!" *)