srecord noeq TimeoutException(double timeoutSeconds, O function, Thread thread) extends RuntimeException { // !customConstructor *(double *timeoutSeconds, O *function, Thread *thread) { super("Timeout after " + iceil(timeoutSeconds) + "s by " + shorten_str(function), makeCause(thread)); } Throwable makeCause(Thread thread) { var stackTrace = thread.getStackTrace(); var cause = new ThrowableWithCustomStackTrace("Still calculating", stackTrace); ret cause; } }