1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Update Data.cpp

This commit is contained in:
Sandu Liviu Catalin 2021-04-17 20:39:32 +03:00
parent 3d11796465
commit eef9063628

View File

@ -547,7 +547,15 @@ static void ProcessPocoData()
if (!inst->mFunc.IsNull())
{
try {
inst->mFunc.Execute(inst->mStmt, inst->mRes.data());
// The active method may have failed. In which case we forward the error message instead
if (!inst->mRes.failed())
{
inst->mFunc.Execute(inst->mStmt, inst->mRes.data());
}
else
{
inst->mFunc.Execute(inst->mStmt, inst->mRes.exception()->message());
}
} catch (const Poco::Exception & e) {
LogErr("SqData.Process: %s", e.displayText().c_str());
} catch (const std::exception & e) {