From 4216eec4942227647f85c27887cb437ffa103e97 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Sun, 8 May 2016 22:22:36 +0100 Subject: [PATCH] fix dynamic assembly --- .../Exception/ExceptionFormatter.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Wox.Infrastructure/Exception/ExceptionFormatter.cs b/Wox.Infrastructure/Exception/ExceptionFormatter.cs index ce232d07d8..5c472b5fc9 100644 --- a/Wox.Infrastructure/Exception/ExceptionFormatter.cs +++ b/Wox.Infrastructure/Exception/ExceptionFormatter.cs @@ -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(")"); }