fix dynamic assembly

This commit is contained in:
bao-qian
2016-05-08 22:22:36 +01:00
parent e88e912c3c
commit 4216eec494

View File

@@ -14,6 +14,7 @@ namespace Wox.Infrastructure.Exception
return CreateExceptionReport(exception);
}
//todo log /display line by line
private static string CreateExceptionReport(System.Exception ex)
{
var sb = new StringBuilder();
@@ -84,7 +85,21 @@ namespace Wox.Infrastructure.Exception
sb.Append("* ");
sb.Append(ass.FullName);
sb.Append(" (");
sb.Append(string.IsNullOrEmpty(ass.Location) ? "not supported" : ass.Location);
if (ass.IsDynamic)
{
sb.Append("dynamic assembly doesn't has location");
}
else if (string.IsNullOrEmpty(ass.Location))
{
sb.Append("location is null or empty");
}
else
{
sb.Append(ass.Location);
}
sb.AppendLine(")");
}