From e1f24abd5d7e6b93f3cbe5aab5031f5d186deef9 Mon Sep 17 00:00:00 2001 From: Nereziel Date: Sat, 25 Nov 2023 13:10:52 +0100 Subject: [PATCH] removed exception --- WeaponPaints.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/WeaponPaints.cs b/WeaponPaints.cs index 44ef69bb..04b221b0 100644 --- a/WeaponPaints.cs +++ b/WeaponPaints.cs @@ -91,7 +91,6 @@ public class WeaponPaints : BasePlugin, IPluginConfig }; public override void Load(bool hotReload) { - SetGlobalExceptionHandler(); if (!Config.GlobalShare) { BuildDatabaseConnectionString(); @@ -219,21 +218,8 @@ async private void CheckDatabaseTables() */ public override void Unload(bool hotReload) { - RemoveGlobalExceptionHandler(); base.Unload(hotReload); } - private void GlobalExceptionHandler(object? sender, FirstChanceExceptionEventArgs @event) - { - Log(@event.Exception.ToString()); - } - private void SetGlobalExceptionHandler() - { - AppDomain.CurrentDomain.FirstChanceException += this.GlobalExceptionHandler; - } - private void RemoveGlobalExceptionHandler() - { - AppDomain.CurrentDomain.FirstChanceException -= this.GlobalExceptionHandler; - } private void RegisterCommands() { AddCommand($"css_{Config.Additional.CommandSkin}", "Skins info", (player, info) => { if (player == null) return; OnCommandWS(player, info); });