Skip to content

Commit 62c11a0

Browse files
committed
Make debug mode clearer during exception
1 parent c5dc21d commit 62c11a0

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Wox.Core/Configuration/Portable.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,11 @@ public void DisablePortableMode()
4040
}
4141
catch (Exception e)
4242
{
43-
#if DEBUG
44-
portabilityUpdater.Dispose();
45-
throw;
46-
#else
4743
portabilityUpdater.Dispose();
44+
#if !DEBUG
4845
Log.Exception("Portable", "Error occured while disabling portable mode", e);
49-
throw;
5046
#endif
47+
throw;
5148
}
5249
}
5350

@@ -76,14 +73,11 @@ public void EnablePortableMode()
7673
}
7774
catch (Exception e)
7875
{
79-
#if DEBUG
80-
portabilityUpdater.Dispose();
81-
throw;
82-
#else
8376
portabilityUpdater.Dispose();
77+
#if !DEBUG
8478
Log.Exception("Portable", "Error occured while enabling portable mode", e);
85-
throw;
8679
#endif
80+
throw;
8781
}
8882
}
8983

0 commit comments

Comments
 (0)