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
1 changed files with 3 additions and 3 deletions

View File

@ -62,9 +62,9 @@ public class FileHelper {
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;
}
}
}