From: erg Date: Mon, 14 Jun 2010 16:55:24 +0000 (+0000) Subject: Add error message when either graph can't be loaded or contains backgrounds X-Git-Tag: LAST_LIBGRAPH~32^2~1316 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fbce8f4863342eccecf3af52e88e4f4f2462dc7f;p=graphviz Add error message when either graph can't be loaded or contains backgrounds which we don't handle yet. --- diff --git a/cmd/tools/gvpack.c b/cmd/tools/gvpack.c index 4c45374df..fae65a3d7 100644 --- a/cmd/tools/gvpack.c +++ b/cmd/tools/gvpack.c @@ -300,8 +300,17 @@ static void init_graph(Agraph_t * g, boolean fill, GVC_t* gvc) } Ndim = GD_ndim(g) = 2; init_node_edge(g); - if (fill && init_nop(g, 0)) { - exit(1); + if (fill) { + int ret = init_nop(g,0); + if (ret) { + if (ret < 0) + fprintf(stderr, "Error loading layout info from graph %s\n", + g->name); + else if (ret > 0) + fprintf(stderr, "gvpack does not support backgrounds as found in graph %s\n", + g->name); + exit(1); + } } }