|
28.01.2011, 23:14 | #1 |
Участник
|
axzaptech: Exceptions Inside Transactions
Источник: http://axzaptech.wordpress.com/2011/...-transactions/
============== When an exception is thrown inside a transaction, the transaction is automatically aborted (a ttsabort operation occurs). This applies both for exceptions thrown manually and for exceptions thrown by the system. If an exception is thrown inside a ttsBegin/ttsCommit block, it will be caught by the first matching catchlist that is outside the transaction block. If there is a catch block within the ttsBegin/ttsCommit, it will be ignored Example Example shows how an exception in a ttsBegin/ttsCommit block is caught by the first catchlist outside the block rather than by the catch within the ttsBegin/ttsCommit block. If you run this code, “outside tts” will be printed before an Infolog displays “Message”. X++: try { ttsbegin; try { throw error(); } catch { print not ; pause; } ttscommit; } catch { print outside ; pause; } Источник: http://axzaptech.wordpress.com/2011/...-transactions/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|