Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/3368
@zentol There are many places in the runtime that declare `throws
Exception`, for example virtually all of the state handling code. This always
came from the desire to throw `IOException` plus something that expresses that
non-I/O stuff related to Flink went wrong. The result was a `throws Exception`,
which also means that you have to catch `Exception` which you often don't want
(because this included `RuntimeException` and you typically want runtime
exception to bubble up a bit further, since they denote bugs by encouraged
design).
The only place where `throws Exception` really makes sense to me is for
`MapFunction` and the likes, to allow them to propagate any type of exception
and let recovery handle them.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---