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