When logging TypeLoad exceptions, add a separate line for logging full name of type that failed to load

This commit is contained in:
UnknownShadow200 2024-03-29 08:01:57 +11:00
parent 0fd9dd802b
commit d885b41161

View File

@ -160,7 +160,12 @@ namespace MCGalaxy
try {
SocketException sockEx = ex as SocketException;
if (sockEx != null) LogSocketErrors(sockEx, sb);
if (sockEx != null) sb.AppendLine("Error: " + sockEx.SocketErrorCode);
} catch { }
try {
TypeLoadException typeEx = ex as TypeLoadException;
if (typeEx != null) sb.AppendLine("Loading type: " + typeEx.TypeName);
} catch { }
}
@ -174,9 +179,5 @@ namespace MCGalaxy
DescribeError(loadEx, sb);
}
}
static void LogSocketErrors(SocketException ex, StringBuilder sb) {
sb.AppendLine("Error: " + ex.SocketErrorCode);
}
}
}