improve error handling.

This commit is contained in:
Vítor Santos Costa 2014-07-03 13:58:00 +01:00
parent 597f5e93f7
commit 2405ab23a5
2 changed files with 13 additions and 0 deletions

View File

@ -626,3 +626,14 @@ YAPQuery *YAPEngine::query( char *s ) {
YAPQuery *n = new YAPQuery( s );
return n;
}
YAPQuery *YAPEngine::safeQuery( char *s ) {
try
{
YAPQuery *n = new YAPQuery( s );
return n;
}
catch (...) {
return 0;
}
}

View File

@ -576,6 +576,8 @@ public:
void run( char *s) { __android_log_print(ANDROID_LOG_INFO, __FUNCTION__, "bef calling disp %s %p",s, _callback); if (_callback) _callback->run(s); }
/// build a query on the engine
YAPQuery *query( char *s );
/// build a query on the engine
YAPQuery *safeQuery( char *s );
};
/*