...
Code Block | ||
---|---|---|
| ||
public void processFile(String inPath, String outPath)
throws IOException{
try (BufferedReader br = new BufferedReader(new FileReader(inPath));
BufferedWriter bw = new BufferedWriter(new FileWriter(outPath));) {
// Process the input and produce the output
} catch (IOException ex) {
System.err.println("thrown exception: " + ex.toString());
Throwable[] suppressed = ex.getSuppressed();
for (int i = 0; i < suppressed.length; i++) {
System.err.println("suppressed exception: " + suppressed[i].toString());
}
}
}
|
...