浏览代码

Logging what element was read to the end

Source commit: 58ee1b72537a4e7956a3e93c5430c05b519e59fb
Martin Prikryl 8 年之前
父节点
当前提交
45c673a8cb
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      dotnet/internal/ElementLogReader.cs

+ 4 - 1
dotnet/internal/ElementLogReader.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Globalization;
 using System.Xml;
 
 namespace WinSCP
@@ -44,7 +45,9 @@ namespace WinSCP
         {
             if (_read)
             {
-                throw Session.Logger.WriteException(new InvalidOperationException("Element already read to the end"));
+                throw Session.Logger.WriteException(
+                    new InvalidOperationException(
+                        string.Format(CultureInfo.CurrentCulture, "Element {0} already read to the end", _token)));
             }
 
             bool result = _parentReader.Read(flags);