better handling for nonExist in the C runtime. BIND is also supported in the linearizer but not in the parser yet

This commit is contained in:
kr.angelov
2013-09-30 10:25:39 +00:00
parent 452164f10f
commit c4f68adca9
4 changed files with 99 additions and 67 deletions

View File

@@ -1378,8 +1378,12 @@ Concr_linearize(ConcrObject* self, PyObject *args)
pgf_linearize(self->concr, pyexpr->expr, out, err);
if (!gu_ok(err)) {
PyErr_SetString(PGFError, "The abstract tree cannot be linearized");
return NULL;
if (gu_exn_caught(err) == gu_type(PgfLinNonExist))
Py_RETURN_NONE;
else {
PyErr_SetString(PGFError, "The abstract tree cannot be linearized");
return NULL;
}
}
GuString str = gu_string_buf_freeze(sbuf, tmp_pool);