mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 12:03:02 +01:00
This should fix the Windows build.
This commit is contained in:
parent
d2899b8163
commit
c449131460
@ -706,7 +706,19 @@ void FUN_evaluate(thread_db* tdbb, UserFunction* function, jrd_nod* node, impure
|
|||||||
// Did the udf send an ill-formed descriptor back?
|
// Did the udf send an ill-formed descriptor back?
|
||||||
UdfError udfError = UeNone;
|
UdfError udfError = UeNone;
|
||||||
|
|
||||||
invoke(tdbb, function, return_ptr, value, args, return_blob_struct, result_was_null, udfError);
|
// When exception happens inside UDF we have no better choice than storing it in
|
||||||
|
// tdbb_status_vector and raising again on return from UDF.
|
||||||
|
//
|
||||||
|
// This code could be inside invoke() but Windows SEH rules play against us.
|
||||||
|
|
||||||
|
{ // scope
|
||||||
|
ThreadStatusGuard tempStatus(tdbb);
|
||||||
|
|
||||||
|
invoke(tdbb, function, return_ptr, value, args, return_blob_struct, result_was_null, udfError);
|
||||||
|
|
||||||
|
if (tempStatus[0] == isc_arg_gds && tempStatus[1] != FB_SUCCESS)
|
||||||
|
ERR_post(Arg::StatusVector(tempStatus));
|
||||||
|
}
|
||||||
|
|
||||||
switch (udfError)
|
switch (udfError)
|
||||||
{
|
{
|
||||||
@ -1163,8 +1175,6 @@ static void invoke(thread_db* tdbb,
|
|||||||
SET_TDBB(tdbb);
|
SET_TDBB(tdbb);
|
||||||
Database* dbb = tdbb->getDatabase();
|
Database* dbb = tdbb->getDatabase();
|
||||||
|
|
||||||
ThreadStatusGuard tempStatus(tdbb);
|
|
||||||
|
|
||||||
START_CHECK_FOR_EXCEPTIONS(function->fun_exception_message.c_str());
|
START_CHECK_FOR_EXCEPTIONS(function->fun_exception_message.c_str());
|
||||||
if (function->fun_return_arg)
|
if (function->fun_return_arg)
|
||||||
{
|
{
|
||||||
@ -1334,12 +1344,6 @@ static void invoke(thread_db* tdbb,
|
|||||||
result_is_null = true;
|
result_is_null = true;
|
||||||
}
|
}
|
||||||
END_CHECK_FOR_EXCEPTIONS(function->fun_exception_message.c_str());
|
END_CHECK_FOR_EXCEPTIONS(function->fun_exception_message.c_str());
|
||||||
|
|
||||||
// When exception happens inside UDF we have no better choice than storing it in
|
|
||||||
// tdbb_status_vector and raising again on return from UDF
|
|
||||||
|
|
||||||
if (tempStatus[0] == isc_arg_gds && tempStatus[1] != FB_SUCCESS)
|
|
||||||
ERR_post(Arg::StatusVector(tempStatus));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user