From 4a7faa58b15b347b8262e89c19c22c45f90e9290 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Sat, 15 Mar 2025 16:20:50 +0800 Subject: [PATCH] fix warnings --- src/Builtin/BaseProcesses.cs | 5 +++-- src/EcsRunner.cs | 22 +++++++++++++--------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/Builtin/BaseProcesses.cs b/src/Builtin/BaseProcesses.cs index c736ccc..e1cfd1c 100644 --- a/src/Builtin/BaseProcesses.cs +++ b/src/Builtin/BaseProcesses.cs @@ -167,9 +167,10 @@ namespace DCFApixels.DragonECS.Internal catch (Exception e) { #if DRAGONECS_DISABLE_CATH_EXCEPTIONS - throw; -#endif + throw e; +#else EcsDebug.PrintError(e); +#endif } } #endif diff --git a/src/EcsRunner.cs b/src/EcsRunner.cs index 757540d..1b457ae 100644 --- a/src/EcsRunner.cs +++ b/src/EcsRunner.cs @@ -7,7 +7,6 @@ using System; using System.Linq; using System.Runtime.CompilerServices; using static DCFApixels.DragonECS.EcsDebugUtility; -#pragma warning disable CS0162 // Обнаружен недостижимый код namespace DCFApixels.DragonECS { @@ -132,6 +131,7 @@ namespace DCFApixels.DragonECS protected virtual void OnSetup() { } #endregion + #region RunHelper #if DEBUG public @@ -227,9 +227,10 @@ namespace DCFApixels.DragonECS catch (Exception e) { #if DRAGONECS_DISABLE_CATH_EXCEPTIONS - throw; -#endif + throw e; +#else EcsDebug.PrintError(e); +#endif } } #endif @@ -266,9 +267,10 @@ namespace DCFApixels.DragonECS catch (Exception e) { #if DRAGONECS_DISABLE_CATH_EXCEPTIONS - throw; -#endif + throw e; +#else EcsDebug.PrintError(e); +#endif } } #endif @@ -399,9 +401,10 @@ namespace DCFApixels.DragonECS catch (Exception e) { #if DRAGONECS_DISABLE_CATH_EXCEPTIONS - throw; -#endif + throw e; +#else EcsDebug.PrintError(e); +#endif } finally { @@ -453,9 +456,10 @@ namespace DCFApixels.DragonECS catch (Exception e) { #if DRAGONECS_DISABLE_CATH_EXCEPTIONS - throw; -#endif + throw e; +#else EcsDebug.PrintError(e); +#endif } finally {