summaryrefslogtreecommitdiff
path: root/src/SMAPI.Internal/ExceptionHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Internal/ExceptionHelper.cs')
-rw-r--r--src/SMAPI.Internal/ExceptionHelper.cs11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/SMAPI.Internal/ExceptionHelper.cs b/src/SMAPI.Internal/ExceptionHelper.cs
index 03d48911..6bd1d579 100644
--- a/src/SMAPI.Internal/ExceptionHelper.cs
+++ b/src/SMAPI.Internal/ExceptionHelper.cs
@@ -25,7 +25,7 @@ namespace StardewModdingAPI.Internal
case ReflectionTypeLoadException ex:
string summary = ex.ToString();
- foreach (Exception childEx in ex.LoaderExceptions ?? Array.Empty<Exception>())
+ foreach (Exception childEx in ex.LoaderExceptions)
summary += $"\n\n{childEx?.GetLogSummary()}";
message = summary;
break;
@@ -43,15 +43,6 @@ namespace StardewModdingAPI.Internal
}
}
- /// <summary>Get the lowest exception in an exception stack.</summary>
- /// <param name="exception">The exception from which to search.</param>
- public static Exception GetInnermostException(this Exception exception)
- {
- while (exception.InnerException != null)
- exception = exception.InnerException;
- return exception;
- }
-
/// <summary>Simplify common patterns in exception log messages that don't convey useful info.</summary>
/// <param name="message">The log message to simplify.</param>
public static string SimplifyExtensionMessage(string message)