From a0d4714a0fdee38eff496586eac1db4e5f756c1f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 6 Nov 2023 12:23:17 +0100 Subject: [PATCH] Add always logging unhandled c# exception #1861 --- Source/Engine/Scripting/Scripting.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/Engine/Scripting/Scripting.cs b/Source/Engine/Scripting/Scripting.cs index 67ba854e0..0630985f3 100644 --- a/Source/Engine/Scripting/Scripting.cs +++ b/Source/Engine/Scripting/Scripting.cs @@ -135,13 +135,10 @@ namespace FlaxEngine { if (e.ExceptionObject is Exception exception) { + Debug.LogError($"Unhandled Exception: {exception.Message}"); + Debug.LogException(exception); if (e.IsTerminating && !System.Diagnostics.Debugger.IsAttached) Platform.Fatal($"Unhandled Exception: {exception}"); - else - { - Debug.LogError($"Unhandled Exception: {exception.Message}"); - Debug.LogException(exception); - } } }