Show full exception message in error message box for managed exceptions

This commit is contained in:
2023-09-28 00:24:44 +03:00
parent 44292efa04
commit bcccb71373
3 changed files with 21 additions and 13 deletions

View File

@@ -135,8 +135,13 @@ 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);
}
}
}