MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / API_ROUTINE gds__transaction_cleanup

Function API_ROUTINE gds__transaction_cleanup

src/yvalve/why.cpp:3711–3735  ·  view source on GitHub ↗

Register a transaction specific cleanup handler.

Source from the content-addressed store, hash-verified

3709
3710// Register a transaction specific cleanup handler.
3711ISC_STATUS API_ROUTINE gds__transaction_cleanup(ISC_STATUS* userStatus, isc_tr_handle* traHandle,
3712 TransactionCleanupRoutine* routine, void* arg)
3713{
3714 StatusVector status(userStatus);
3715 CheckStatusWrapper statusWrapper(&status);
3716
3717 try
3718 {
3719 RefPtr<YTransaction> transaction(translateHandle(transactions, traHandle));
3720
3721 AutoPtr<CleanupCallbackImpl<YTransaction, TransactionCleanupRoutine> > callback(
3722 FB_NEW CleanupCallbackImpl<YTransaction, TransactionCleanupRoutine>(transaction, routine, arg));
3723
3724 transaction->addCleanupHandler(&statusWrapper, callback);
3725
3726 if (!(status.getState() & IStatus::STATE_ERRORS))
3727 callback.release();
3728 }
3729 catch (const Exception& e)
3730 {
3731 e.stuffException(&statusWrapper);
3732 }
3733
3734 return status[1];
3735}
3736
3737
3738// Provide information on transaction object.

Callers

nothing calls this directly

Calls 5

translateHandleFunction · 0.85
addCleanupHandlerMethod · 0.80
getStateMethod · 0.45
releaseMethod · 0.45
stuffExceptionMethod · 0.45

Tested by

no test coverage detected