pnowojski commented on a change in pull request #10336: 
[FLINK-14935][task,runtime] Use RunnableWithException in the Mailbox
URL: https://github.com/apache/flink/pull/10336#discussion_r351371278
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxExecutorImpl.java
 ##########
 @@ -68,14 +70,23 @@ public void executeFirst(
 
        @Override
        public void yield() throws InterruptedException {
-               mailbox.take(priority).run();
+               Mail mail = mailbox.take(priority);
+               try {
+                       mail.run();
+               } catch (Exception ex) {
+                       throw new FlinkRuntimeException(ex);
 
 Review comment:
   A little bit - it allows us/user to classify runtime exceptions that 
originate from Flink. Also this is I think our convention and potentially a 
bigger discussion whether we need `FlinkException`/`FlinkRuntimeException` 
hierarchy.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to