AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.01.2011, 23:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,510 / 847 (80) +++++++
Регистрация: 28.10.2006
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;
 }
Source: http://msdn.microsoft.com/en-us/libr...85(AX.10).aspx





Источник: http://axzaptech.wordpress.com/2011/...-transactions/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Issues concerning X++: Exception handling and transactions Blog bot DAX Blogs 1 14.02.2009 00:46
Holzheys: X++ Transactions, exceptions and updateconflicts. Blog bot DAX Blogs 2 10.10.2008 01:23
staticsax: New approach to Exceptions and Transactions handling Blog bot DAX Blogs 0 13.11.2007 20:30
Inside Dynamics AX 4.0: Transaction Semantics Blog bot DAX Blogs 0 31.10.2007 23:40
Inside Dynamics AX 4.0: Working with the .NET Business Connector Blog bot DAX Blogs 0 04.10.2007 05:15

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:44.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.