by sc22 · 2y ago · 0 comments
interface ThrowingRunnable<E extends Throwable> {
void run() throws E;
}
Only, hardly anybody writes it that way, so people forget that it's possible. Why don't people use exception polymorphism in that way? I am not sure, but I believe it would make code too verbose, since every function containing a virtual method call to something that might throw would have to be parameterized that way.No comments yet.