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;
}
}