From cf05e787128412a2063bdfedf35280fdb0f1fad3 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Mon, 21 Oct 2013 12:35:34 +0000 Subject: [PATCH] clumsy fix for nonExist in pgf-translate --- src/runtime/c/utils/pgf-translate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/runtime/c/utils/pgf-translate.c b/src/runtime/c/utils/pgf-translate.c index abd22267c..79a4fdd42 100644 --- a/src/runtime/c/utils/pgf-translate.c +++ b/src/runtime/c/utils/pgf-translate.c @@ -34,7 +34,13 @@ print_result(PgfExprProb* ep, PgfConcr* to_concr, gu_putc(' ', out, err); // Linearize the concrete tree as a simple // sequence of strings. - pgf_lzr_linearize_simple(to_concr , ctree, 0, out, err); + pgf_lzr_linearize_simple(to_concr, ctree, 0, out, err); + if (gu_exn_caught(err) == gu_type(PgfLinNonExist)) { + // encountered nonExist. Unfortunately there + // might be some output printed already. The + // right solution should be to use GuStringBuf. + gu_exn_clear(err); + } gu_putc('\n', out, err); gu_out_flush(out, err); }