Skip to content

Commit 0c6bee2

Browse files
committed
Improve logging
1 parent def3345 commit 0c6bee2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

BepInEx/Utility.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
55
using System.Reflection;
66
using System.Reflection.Emit;
77
using System.Text;
8+
using BepInEx.Logging;
89
using Mono.Cecil;
910
using MonoMod.Utils;
1011

@@ -199,10 +200,12 @@ private static bool TryResolveDllAssembly<T>(AssemblyName assemblyName, string d
199200

200201
try
201202
{
203+
Logger.LogDebug($"Loading {path}");
202204
assembly = loader(path);
203205
}
204-
catch (Exception)
206+
catch (Exception e)
205207
{
208+
Logger.LogError($"Failed to load {path}: {e}");
206209
continue;
207210
}
208211

@@ -320,4 +323,4 @@ public static IEnumerable<string> GetUniqueFilesInDirectories(IEnumerable<string
320323
return result.Values;
321324
}
322325
}
323-
}
326+
}

0 commit comments

Comments
 (0)