flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steveloughran <...@git.apache.org>
Subject [GitHub] flink pull request #5521: [FLINK-8599] Improve the failure behavior of the F...
Date Wed, 21 Feb 2018 11:15:31 GMT
Github user steveloughran commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5521#discussion_r169604725
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
---
    @@ -819,6 +819,10 @@ public void open(FileInputSplit fileSplit) throws IOException {
     			this.stream = isot.waitForCompletion();
     			this.stream = decorateInputStream(this.stream, fileSplit);
     		}
    +		catch (FileNotFoundException e) {
    +			throw new FileNotFoundException("Input split " + fileSplit.getPath() +
    +					" doesn't exist, skip and continue: "  + e.getMessage());
    +		}
    --- End diff --
    
    As this exception doesn't have a constructor which takes a nested exception, can you use
`initCause()` to patch it.
    
    ```java
    throw (FileNotFoundException)(new FileNotFoundException(...)).initCause(e)
    ```


---

Mime
View raw message