Skip to content

Commit a79beff

Browse files
committed
Log Ping InnerException if possible
1 parent 94fa0ea commit a79beff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modNetwork.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,13 @@ public static string SendPing(string Host, int repeat = 1)
171171
}
172172
catch (Exception err)
173173
{
174-
modLogging.LogEvent(err.Message, EventLogEntryType.Error, 6011);
174+
if (err.InnerException != null)
175+
{
176+
modLogging.LogEvent(err.InnerException.Message, EventLogEntryType.Error, 6011);
177+
} else
178+
{
179+
modLogging.LogEvent(err.Message, EventLogEntryType.Error, 6011);
180+
}
175181
return "Ping error";
176182
}
177183
}

0 commit comments

Comments
 (0)