Browse Source

Cleaned up event handler exceptions

tags/docs-0.9
RogueException 9 years ago
parent
commit
8609bad8ab
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Discord.Net/DiscordClient.Events.cs

+ 2
- 2
src/Discord.Net/DiscordClient.Events.cs View File

@@ -99,7 +99,7 @@ namespace Discord
try { handler(this, eventArgs); }
catch (Exception ex)
{
Logger.Error($"{callerName.Substring(2)}'s handler encountered error {ex.GetType().Name}: ${ex.Message}", ex);
Logger.Error($"{callerName.Substring(2)}'s handler encountered an error", ex);
}
}
private void OnEvent(EventHandler handler, [CallerMemberName] string callerName = null)
@@ -107,7 +107,7 @@ namespace Discord
try { handler(this, EventArgs.Empty); }
catch (Exception ex)
{
Logger.Error($"{callerName.Substring(2)}'s handler encountered error {ex.GetType().Name}: ${ex.Message}", ex);
Logger.Error($"{callerName.Substring(2)}'s handler encountered an error", ex);
}
}
}


Loading…
Cancel
Save