improve error handling.
This commit is contained in:
parent
597f5e93f7
commit
2405ab23a5
11
CXX/yapi.cpp
11
CXX/yapi.cpp
@ -626,3 +626,14 @@ YAPQuery *YAPEngine::query( char *s ) {
|
|||||||
YAPQuery *n = new YAPQuery( s );
|
YAPQuery *n = new YAPQuery( s );
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
YAPQuery *YAPEngine::safeQuery( char *s ) {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
YAPQuery *n = new YAPQuery( s );
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -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); }
|
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
|
/// build a query on the engine
|
||||||
YAPQuery *query( char *s );
|
YAPQuery *query( char *s );
|
||||||
|
/// build a query on the engine
|
||||||
|
YAPQuery *safeQuery( char *s );
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user