Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-5854

Introduce some Flink-specific base Exception types


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0
    • Component/s: Core
    • Labels:


      Going through the code, there are a lot of places where exception handling could be done a bit nicer, for example

      • Some methods do not declare exceptions at all in their signatures. They simply catch all and wrap it in a RuntimeException.
      • Some places declare overly generic that they throw Exception, even though they could very specifically type the exceptions they throw.

      I suggest to introduce two new basic exceptions, that at least help document a bit more what goes wrong:

      • FlinkException as a base class for checked exceptions that indicate that something related to using Flink went wrong. Letting a method throw FlinkException rather than Exception already helps to not include all of Java's runtime exceptions, which indicate programming errors, rather than situations that should be recovered.
      • FlinkUncheckedException as a Flink-specific subclass of RuntimeException. That one can come in handy in places where no exceptions were declared, for example when reusing an interface that does not declare exceptions.


          Issue Links



              • Assignee:
                StephanEwen Stephan Ewen
                StephanEwen Stephan Ewen
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: