From 08f525eb3efc38bb21058a5e9ca71b108c816dcc Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Wed, 25 Apr 2018 14:09:09 -0400 Subject: [PATCH] feat: Clearer log message for failing to cache assembly --- ICD.Common.Utils/AttributeUtils.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ICD.Common.Utils/AttributeUtils.cs b/ICD.Common.Utils/AttributeUtils.cs index e9cf173..2cd9943 100644 --- a/ICD.Common.Utils/AttributeUtils.cs +++ b/ICD.Common.Utils/AttributeUtils.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using ICD.Common.Properties; using ICD.Common.Utils.Collections; @@ -84,6 +85,14 @@ namespace ICD.Common.Utils { 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, assembly.GetName().Name); }