static Runnable _topLevelErrorHandling(Runnable r) { ifdef LeanMode ret r; endifdef ifndef LeanMode if (r == null) null; // maybe we don't want this anymore. just dm_current_generic() O info = _threadInfo(); O mod = dm_current_generic(); Runnable r2 = r; if (info != null || mod == null) r2 = r { temp (AutoCloseable) rcall enter(mod); _threadInheritInfo(info); r.run(); }; r2 = rPcall(r2); ret r2; endifndef }