swig error handling fixes

This commit is contained in:
Vítor Santos Costa 2014-07-14 00:03:08 -05:00
parent 0738fe0bd2
commit 0e79c53d1e
2 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,8 @@ public class JavaYap extends Activity
YAPQuery q = eng.query( str ); YAPQuery q = eng.query( str );
YAPListTerm vs0 = q.namedVars(); YAPListTerm vs0 = q.namedVars();
int rc;
// text.setText(""); // text.setText("");
if (vs0.nil()) { if (vs0.nil()) {
if (q.next()) { if (q.next()) {
@ -39,7 +41,7 @@ public class JavaYap extends Activity
} }
} else { } else {
int i=1; int i=1;
while (q.next()) { while (rc = q.next()) {
YAPListTerm vs = vs0; YAPListTerm vs = vs0;
while(!vs.nil()){ while(!vs.nil()){
YAPTerm eq = vs.car(); YAPTerm eq = vs.car();

View File

@ -33,7 +33,6 @@ class YAPPredicate;
try { try {
$action $action
} catch (...) { } catch (...) {
fprintf(stderr,"here\n");
PyErr_SetString(PyExc_SyntaxError, "syntax error"); PyErr_SetString(PyExc_SyntaxError, "syntax error");
return NULL; return NULL;
} }