// changes the icon of all error-having modules' frames to a little flash icon sclass ErrorIcon extends Module { void update { for (Module m : onModules()) { O error = m.getError(); if (error != null) internalFrameIcon(m.vis, #1101276); } } } sclass Errors extends Module { L errors = synchroList(new CircularArrayList); int errorsToKeep = 10; void addError(Throwable e) { addToListWithMaxSize(errors, e, errorsToKeep); change(); } }