From 4706d71639cea40d9b98bac5e8528d29881a57be Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 23 Apr 2026 14:31:38 -0400 Subject: [PATCH] Fix warning --- playlet-lib/src/source/utils/DebugUtils.bs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/playlet-lib/src/source/utils/DebugUtils.bs b/playlet-lib/src/source/utils/DebugUtils.bs index ff6c5571..150ce54f 100644 --- a/playlet-lib/src/source/utils/DebugUtils.bs +++ b/playlet-lib/src/source/utils/DebugUtils.bs @@ -1,6 +1,7 @@ -namespace DebugUtils - function PrintStackTrace(message = invalid as dynamic) - #if DEBUG +#if DEBUG + namespace DebugUtils + function PrintStackTrace(message = invalid as dynamic) + try throw "Handled throw in DebugUtils.PrintStackTrace()" catch error @@ -15,11 +16,9 @@ namespace DebugUtils end for PrintInABox(lines) end try - #end if - end function + end function - function PrintInABox(lines as object) - #if DEBUG + function PrintInABox(lines as object) maxLen = 0 for each line in lines if line.len() > maxLen @@ -32,6 +31,6 @@ namespace DebugUtils end for out += `\n` + "╚" + string(maxLen + 2, "═") + "╝" print out - #end if - end function -end namespace + end function + end namespace +#end if