Fix crash during migration on Android by avoiding to throw exceptions. Apparently exceptions do not work reliabily on android, at least not with our current toolchain and compilation options.

This commit is contained in:
Simon Morlat 2018-02-15 12:50:26 +01:00
parent 7137ca85dc
commit 9fead71899

View file

@ -1256,13 +1256,11 @@ template<typename T>
static T getValueFromRow (const soci::row &row, int index, bool &isNull) {
isNull = false;
try {
return row.get<T>(size_t(index));
} catch (const exception &) {
if (row.get_indicator(size_t(index)) == soci::i_null){
isNull = true;
return T();
}
return T();
return row.get<T>(size_t(index));
}
// -----------------------------------------------------------------------------