System.NotSupportedException:不支持给定路径的格式

时间:2014-03-25 05:26:53

标签: c# c#-4.0 exception c#-3.0 ranorex

static void cmd_DataReceived(object sender, DataReceivedEventArgs e)
    {
        List<string> found = new List<string>();
        string line;
        using(StreamReader file =  new StreamReader(e.Data))
        {
            while((line = file.ReadLine()) != null)
            {
                if(line.Contains("Passed"))
                {
                    found.Add(line);
                }
            }
        }
        foreach (string Txt in found)
        {
            Report.Info("Output from other process");
            Report.Success(Txt);
        }
    }

上面的代码给出了例外。我得到的例外。 System.NotSupportedException: The given path's format is not supported. at System.Security.Util.StringExpressionSet.CanonicalizePath at System.Security.Util.StringExpressionSet.CreateListFromExpressions at System.Security.Permissions.FileIOPermission.AddPathList

我在ranorex测试自动化工具中运行此C#代码。

1 个答案:

答案 0 :(得分:0)

我不认为这是Ranorex问题。代码中的哪一行会导致错误?