From e6cd56946cc66186258f11fb7b02fab5cd14c5b6 Mon Sep 17 00:00:00 2001 From: appelemac Date: Sun, 5 Jun 2016 20:50:44 +0200 Subject: [PATCH] Revert "Code analysis recommended this" This reverts commit 1f8dd72606bc5a8d335a715c069cd820db364170. --- NadekoBot/Classes/NadekoStats.cs | 17 +---------------- .../Modules/Searches/Commands/EvalCommand.cs | 4 ++-- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/NadekoBot/Classes/NadekoStats.cs b/NadekoBot/Classes/NadekoStats.cs index 36fe55bd..66ef0984 100644 --- a/NadekoBot/Classes/NadekoStats.cs +++ b/NadekoBot/Classes/NadekoStats.cs @@ -14,7 +14,7 @@ using System.Timers; namespace NadekoBot { - public class NadekoStats : IDisposable + public class NadekoStats { public static NadekoStats Instance { get; } = new NadekoStats(); @@ -231,20 +231,5 @@ namespace NadekoBot } }).ConfigureAwait(false); } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - private void Dispose(bool disposing) - { - if (disposing) - { - carbonClient.Dispose(); - } - - } } } \ No newline at end of file diff --git a/NadekoBot/Modules/Searches/Commands/EvalCommand.cs b/NadekoBot/Modules/Searches/Commands/EvalCommand.cs index fdb2f1c1..57f45342 100644 --- a/NadekoBot/Modules/Searches/Commands/EvalCommand.cs +++ b/NadekoBot/Modules/Searches/Commands/EvalCommand.cs @@ -49,11 +49,11 @@ namespace NadekoBot.Modules.Searches.Commands string result = parser.Parse(expression).ToString(); return result; } - catch (OverflowException) + catch (OverflowException e) { return $"Overflow error on {expression}"; } - catch (FormatException) + catch (FormatException e) { return $"\"{expression}\" was not formatted correctly"; }