Add supressed exception for more info 2

This commit is contained in:
Lukas Rieger (Blue) 2023-06-21 15:13:27 +02:00
parent e66838cdbc
commit 72264a2e86
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -62,9 +62,9 @@ public static void move(Path from, Path to) throws IOException {
try {
Files.move(from, to, StandardCopyOption.REPLACE_EXISTING);
} catch (FileNotFoundException | NoSuchFileException ignore) {
} catch (IOException ex2) {
ex2.addSuppressed(ex);
throw ex2;
} catch (Throwable t) {
t.addSuppressed(ex);
throw t;
}
}
}