srecord noeq TimeoutException(double timeoutSeconds, O function, Thread thread) extends RuntimeException { @Override public S getMessage() { ret "Timeout after " + iceil(timeoutSeconds) + "s by " + shorten_str(function); } cached S innerStackTrace() { ret renderStackTrace(thread.getStackTrace()); } public Throwable getCause() { ret new Throwable("Still calculating") { public void fillInStackStrace() { stackTrace = innerStackTrace(); } }; } }