// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals integer array Test_nextFree integer Test_firstFree=0 integer Test_maxIndex=0 integer array Test_typeId integer wurst_stack_depth=0 string array wurst_stack endglobals function error takes string msg, string w__wurst_stackPos returns nothing local integer stacktraceIndex local integer stacktraceLimit set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set w__wurst_stackPos = "" set stacktraceIndex = wurst_stack_depth set stacktraceLimit = 0 loop set stacktraceIndex = stacktraceIndex - 1 set stacktraceLimit = stacktraceLimit + 1 exitwhen stacktraceLimit > 20 or stacktraceIndex < 0 set w__wurst_stackPos = w__wurst_stackPos + "\n " + wurst_stack[stacktraceIndex] endloop call BJDebugMsg(msg + "\n" + w__wurst_stackPos) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function initGlobals takes nothing returns nothing endfunction function new_Test takes string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Test in realIndex, line 7" set wurst_stack_depth = wurst_stack_depth + 1 if Test_firstFree == 0 then if Test_maxIndex < 32768 then set Test_maxIndex = Test_maxIndex + 1 set this = Test_maxIndex set Test_typeId[this] = 1 else call error("Out of memory: Could not create Test.", "when calling error in realIndex, line 7") set this = 0 endif else set Test_firstFree = Test_firstFree - 1 set this = Test_nextFree[Test_firstFree] set Test_typeId[this] = 1 endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 return this endfunction function main takes nothing returns nothing local integer t call initGlobals() set wurst_stack[wurst_stack_depth] = "when calling init_test in realIndex, line 1" set wurst_stack_depth = wurst_stack_depth + 1 set t = new_Test("when calling new_Test in realIndex, line 18") set wurst_stack[wurst_stack_depth] = "when calling colorize in realIndex, line 19" set wurst_stack_depth = wurst_stack_depth + 1 if Test_typeId[t] == 0 then if t == 0 then call error("Nullpointer exception when calling Test.colorize", "when calling error in realIndex, line 9") else call error("Called Test.colorize on invalid object.", "when calling error in realIndex, line 9") endif endif set wurst_stack_depth = wurst_stack_depth - 1 - 1 endfunction function config takes nothing returns nothing endfunction