feat: Clearer log message for failing to cache assembly

This commit is contained in:
Chris Cameron
2018-04-25 14:09:09 -04:00
parent 7b8ae8402e
commit 08f525eb3e

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using ICD.Common.Properties; using ICD.Common.Properties;
using ICD.Common.Utils.Collections; using ICD.Common.Utils.Collections;
@@ -84,6 +85,14 @@ namespace ICD.Common.Utils
{ {
foreach (Exception inner in e.LoaderExceptions) foreach (Exception inner in e.LoaderExceptions)
{ {
if (inner is FileNotFoundException)
{
Logger.AddEntry(eSeverity.Error,
"{0} failed to cache assembly {1} - Could not find one or more dependencies by path",
typeof(AttributeUtils).Name, assembly.GetName().Name);
continue;
}
Logger.AddEntry(eSeverity.Error, inner, "{0} failed to cache assembly {1}", typeof(AttributeUtils).Name, Logger.AddEntry(eSeverity.Error, inner, "{0} failed to cache assembly {1}", typeof(AttributeUtils).Name,
assembly.GetName().Name); assembly.GetName().Name);
} }