sclass ErrorCounter { new LPair errors; int total; void run(O info, Runnable r) { try { r.run(); } catch print e { errors.add(pair(info, e)); } ++total; } void print() { if (empty(errors)) _print("No errors (tests: " + total + ")"); else _print(n2(errors, "error") + " in " + n2(total, "test") + ". Fails: " + pairsA(errors)); } }