Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/459#discussion_r26010235
  
    --- Diff: 
flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/invokable/operator/co/CoInvokable.java
 ---
    @@ -84,7 +84,16 @@ public void invoke() throws Exception {
                                next = recordIterator.next(reuse1, reuse2);
                        } catch (IOException e) {
                                if (isRunning) {
    -                                   throw e;
    +                                   throw new RuntimeException("Could not 
read next record due to: "
    +                                                   + 
StringUtils.stringifyException(e));
    --- End diff --
    
    I think the `stringifyException` is an antipattern. Exceptions should be 
chained, the stack trace should not go into the message. I would actually go as 
far as removing `StringUtils.stringifyException`, because it encourages bad use 
of exceptions.


---
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.
---

Reply via email to