improve error handling.
This commit is contained in:
11
CXX/yapi.cpp
11
CXX/yapi.cpp
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user