Commit 09d5c938 authored by bguillaum's avatar bguillaum

version 2.24.1: adapt to new Conll Error type (json)

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/semagramme/dep2pict/trunk@9279 7838e531-6607-4d57-9587-6c381814729c
parent baf5dc5a
true: package(containers, str, ANSITerminal, camomile, cairo2, log, svg, conll, dep2pict)
true: package(containers, str, ANSITerminal, yojson, camomile, cairo2, log, svg, conll, dep2pict)
......@@ -83,7 +83,7 @@ let main () =
| Dep2pict.Unknown_index id -> ui#error_view#buffer#set_text ("Can't find index: "^id)
| Dep2pict.Loop_in_dep msg -> ui#error_view#buffer#set_text ("Loop in dependency: "^msg)
| Dep2pict.Conll_format msg -> ui#error_view#buffer#set_text ("Conll format: "^msg)
| Conll_types.Error msg -> ui#error_view#buffer#set_text ("XXX: "^ msg) in
| Conll_types.Error json -> ui#error_view#buffer#set_text (Yojson.Basic.pretty_to_string json) in
(* check if file has changed *)
......
......@@ -97,9 +97,9 @@ let _ =
Log.warning "Dep2pict was compiled without lablwebkit, the GUI in not available"; exit 0
#endif
| Some out_file ->
try
load !input_file;
set_position ();
try
let graph = match (!current_data, !current_position) with
| (Dep g,_) -> g
| (Conll arr, pos) -> Dep2pict.from_conll (snd arr.(pos)) in
......@@ -122,4 +122,5 @@ let _ =
| Dep2pict.Conll_format msg -> critical "Invalid CONLL line: %s" msg
| Dep2pict.Unknown_index id -> critical "Can't find index: %s" id
| Dep2pict.Loop_in_dep msg -> critical "Loop in dependency: %s" msg
| Conll_types.Error json -> critical "%s" (Yojson.Basic.pretty_to_string json)
| exc -> critical "Unexpected exception <%s>, please report" (Printexc.to_string exc)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment