Skip to content

Commit

Permalink
removed exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Nereziel committed Nov 25, 2023
1 parent 646050f commit e1f24ab
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions WeaponPaints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig>
};
public override void Load(bool hotReload)
{
SetGlobalExceptionHandler();
if (!Config.GlobalShare)
{
BuildDatabaseConnectionString();
Expand Down Expand Up @@ -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); });
Expand Down

0 comments on commit e1f24ab

Please sign in to comment.