scope dm_initErrorHandling. please include function _registerThread. please include function _threadInheritInfo. please include function _threadInfo. please include function _onAWTEnter. static new Flag #flag; svoid dm_initErrorHandling() { raiseFlagAndDo(flag, r { _handleException_addHandler(f handler); assertNull(_onRegisterThread); _onRegisterThread = voidfunc(Thread t) { DynModule m = dm_currentModule(); if (m == null) printStackTrace("New thread made outside of a module"); else m.ownTimer(t); }; _threadInfo_f = f dm_currentModule; _threadInheritInfo_f = voidfunc(O info) { if (info instanceof DynModule) dm_currentModule_value.set((DynModule) info); }; }); } svoid #handler(Throwable e) { DynModule m = dm_currentModule(); if (m == null) print("Weird: Error outside of module"); else m.setField(error := persistableThrowable(e)); } end scope