> You can do that, but you need to do it for every exception type ): I'd love it if Java had templated exceptions.
It does have them. You can write an interface with a type parameter `<E extends Throwable>` and declare functions inside it with `throws E`