From 62c11a09c5dfbc2a591a75ee16af8c5fd6dc0da4 Mon Sep 17 00:00:00 2001 From: Jeremy Wu Date: Sun, 22 Mar 2020 19:52:16 +1100 Subject: [PATCH] Make debug mode clearer during exception --- Wox.Core/Configuration/Portable.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Wox.Core/Configuration/Portable.cs b/Wox.Core/Configuration/Portable.cs index 7789072bd..1d17f000a 100644 --- a/Wox.Core/Configuration/Portable.cs +++ b/Wox.Core/Configuration/Portable.cs @@ -40,14 +40,11 @@ namespace Wox.Core.Configuration } catch (Exception e) { -#if DEBUG - portabilityUpdater.Dispose(); - throw; -#else portabilityUpdater.Dispose(); +#if !DEBUG Log.Exception("Portable", "Error occured while disabling portable mode", e); - throw; #endif + throw; } } @@ -76,14 +73,11 @@ namespace Wox.Core.Configuration } catch (Exception e) { -#if DEBUG - portabilityUpdater.Dispose(); - throw; -#else portabilityUpdater.Dispose(); +#if !DEBUG Log.Exception("Portable", "Error occured while enabling portable mode", e); - throw; #endif + throw; } }