Показать сообщение отдельно
Старый 02.12.2014, 19:59   #4  
IKA is offline
IKA
Участник
 
359 / 65 (3) ++++
Регистрация: 15.03.2006
Проблема в том. что этот код периодически затирает весь инфолог, а не только те строки, что записались при DuplicateKeyException . Воспроизвести не всегда получается. Если я отлаживаю код в дебаггере, то все ок. Если без дебаггера запускаю, то периодически исчезают строки из инфолога.
Я грешу на метод
X++:
Counter   logCount = infologLine();
, если в него заглянуть, то написано:
Цитата:
This method has similar functionality to the <c>xInfo.line</c> method, but it improves performance
/// and lowers network load when you are executing server-side code.When the <c>xInfo.line</c> method
/// is run on the server, it makes a call to the client to retrieve the number of lines in the Infolog
/// buffer. The <c>xGlobal::infologLine</c> method retrieves the server-side Infolog buffer line count.
/// This eliminates the requirement to call to the client. When the <c>xGlobal::infologLine</c> method
/// is called on the client, it returns the count directly from the Infolog buffer on the client.This
/// method is especially useful when you write server-side code that processes exceptions.The number of
/// lines in the Infolog is generally stored before entering a <c>try</c> / <c>catch</c> block.If an
/// exception occurs, the number of lines that were previously stored is used to determine which
/// messages were logged during the code in the <c>try</c> block. If no exceptions occur, the stored
/// Infolog buffer line count is often unused. If you use the <c>xGlobal::infologLine</c> method
/// instead of the <c>xInfo.line</c> method to retrieve the Infolog lines, a round-trip to the client
/// is prevented.
/// </remarks>
Думается мне , что серверный инфолог не всегда корректное количество строк возвращает, и в этом кроется проблема, щас попробую для проверки на
X++:
xInfo.line
перейти, и посмотрим, что будет

Последний раз редактировалось IKA; 02.12.2014 в 20:25.