From e1d8e758bb6ebe25a79f6f01417b9c5113457989 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 21 Aug 2024 16:31:10 -0400 Subject: [PATCH 1/2] completion server fixin? --- source/funkin/util/logging/CrashHandler.hx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source/funkin/util/logging/CrashHandler.hx b/source/funkin/util/logging/CrashHandler.hx index 71d1ad394..aa2622062 100644 --- a/source/funkin/util/logging/CrashHandler.hx +++ b/source/funkin/util/logging/CrashHandler.hx @@ -265,9 +265,10 @@ class CrashHandler static function renderMethod():String { - try + var outputStr:String = 'UNKNOWN'; + outputStr = try { - return switch (FlxG.renderMethod) + switch (FlxG.renderMethod) { case FlxRenderMethod.DRAW_TILES: 'DRAW_TILES'; case FlxRenderMethod.BLITTING: 'BLITTING'; @@ -276,7 +277,11 @@ class CrashHandler } catch (e) { - return 'ERROR ON QUERY RENDER METHOD: ${e}'; + 'ERROR ON QUERY RENDER METHOD: ${e}'; } + + if (outputStr == null) outputStr = 'UNKNOWN'; + + return outputStr; } } From 5756eff7cfd35b3eb0cbb234b31fc50705e0b779 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 21 Aug 2024 16:39:34 -0400 Subject: [PATCH 2/2] dont need null check, we just need to declare string type --- source/funkin/util/logging/CrashHandler.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/funkin/util/logging/CrashHandler.hx b/source/funkin/util/logging/CrashHandler.hx index aa2622062..1b607ddfd 100644 --- a/source/funkin/util/logging/CrashHandler.hx +++ b/source/funkin/util/logging/CrashHandler.hx @@ -280,8 +280,6 @@ class CrashHandler 'ERROR ON QUERY RENDER METHOD: ${e}'; } - if (outputStr == null) outputStr = 'UNKNOWN'; - return outputStr; } }