summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Program.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2016-11-23 20:23:42 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2016-11-23 20:23:42 -0500
commit1dc3f1013f9aa654bdcf22cdd22f1efd3d5d2315 (patch)
tree4f8f2de9800434d099aaf2f3b294a21068c6facb /src/StardewModdingAPI/Program.cs
parent651388c818fbac331e28c07c6fd101c6fa61685c (diff)
downloadSMAPI-1dc3f1013f9aa654bdcf22cdd22f1efd3d5d2315.tar.gz
SMAPI-1dc3f1013f9aa654bdcf22cdd22f1efd3d5d2315.tar.bz2
SMAPI-1dc3f1013f9aa654bdcf22cdd22f1efd3d5d2315.zip
log relevant details when a ReflectionTypeLoadException is caught by SMAPI
Diffstat (limited to 'src/StardewModdingAPI/Program.cs')
-rw-r--r--src/StardewModdingAPI/Program.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 5561aeec..0871e98a 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -142,7 +142,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"Critical error: {ex}", LogLevel.Error);
+ Program.Monitor.Log($"Critical error: {ex.GetLogSummary()}", LogLevel.Error);
}
Program.PressAnyKeyToExit();
}
@@ -179,7 +179,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"Couldn't check for a new version of SMAPI. This won't affect your game, but you may not be notified of new versions if this keeps happening.\n{ex}");
+ Program.Monitor.Log($"Couldn't check for a new version of SMAPI. This won't affect your game, but you may not be notified of new versions if this keeps happening.\n{ex.GetLogSummary()}");
}
}).Start();
}
@@ -198,7 +198,7 @@ namespace StardewModdingAPI
// add error interceptors
#if SMAPI_FOR_WINDOWS
- Application.ThreadException += (sender, e) => Program.Monitor.Log($"Critical thread exception: {e.Exception}", LogLevel.Error);
+ Application.ThreadException += (sender, e) => Program.Monitor.Log($"Critical thread exception: {e.Exception.GetLogSummary()}", LogLevel.Error);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
#endif
AppDomain.CurrentDomain.UnhandledException += (sender, e) => Program.Monitor.Log($"Critical app domain exception: {e.ExceptionObject}", LogLevel.Error);
@@ -262,7 +262,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"SMAPI encountered a fatal error:\n{ex}", LogLevel.Error);
+ Program.Monitor.Log($"SMAPI encountered a fatal error:\n{ex.GetLogSummary()}", LogLevel.Error);
}
}
@@ -277,7 +277,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"Couldn't create a path: {path}\n\n{ex}", LogLevel.Error);
+ Program.Monitor.Log($"Couldn't create a path: {path}\n\n{ex.GetLogSummary()}", LogLevel.Error);
}
}
@@ -330,7 +330,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"{errorPrefix}: manifest parsing failed.\n{ex}", LogLevel.Error);
+ Program.Monitor.Log($"{errorPrefix}: manifest parsing failed.\n{ex.GetLogSummary()}", LogLevel.Error);
continue;
}
@@ -369,7 +369,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"{errorPrefix}: couldm't create the per-save configuration directory ('psconfigs') requested by this mod.\n{ex}", LogLevel.Error);
+ Program.Monitor.Log($"{errorPrefix}: couldm't create the per-save configuration directory ('psconfigs') requested by this mod.\n{ex.GetLogSummary()}", LogLevel.Error);
continue;
}
}
@@ -417,7 +417,7 @@ namespace StardewModdingAPI
}
catch (Exception ex)
{
- Program.Monitor.Log($"{errorPrefix}: an error occurred while loading the target DLL.\n{ex}", LogLevel.Error);
+ Program.Monitor.Log($"{errorPrefix}: an error occurred while loading the target DLL.\n{ex.GetLogSummary()}", LogLevel.Error);
}
}
}