diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-06 18:25:00 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2022-04-06 18:25:00 -0400 |
commit | 077d8e4f401ad1806c6af0540f432366314a2300 (patch) | |
tree | 525c6787f90a1e962f9a3b84ee495b2d0e8e2cc8 /src/SMAPI.Internal | |
parent | 0539bb8f3705e5c50d0e5790e2af97f39aed04b8 (diff) | |
download | SMAPI-077d8e4f401ad1806c6af0540f432366314a2300.tar.gz SMAPI-077d8e4f401ad1806c6af0540f432366314a2300.tar.bz2 SMAPI-077d8e4f401ad1806c6af0540f432366314a2300.zip |
remove some unused/redundant code
Diffstat (limited to 'src/SMAPI.Internal')
-rw-r--r-- | src/SMAPI.Internal/ExceptionHelper.cs | 11 |
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) |