Skip to content

Commit 9949dce

Browse files
authored
[AMQ-9859] IOHelper: Do not swallow thrown exception to lose stacktrace when move fails (esp on windows) (#1655)
1 parent 46b7f68 commit 9949dce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • activemq-broker/src/main/java/org/apache/activemq/util

activemq-broker/src/main/java/org/apache/activemq/util/IOHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public static void moveFile(File src, File targetDirectory) throws IOException {
197197
try {
198198
Files.move(sourcePath, targetDirPath.resolve(sourcePath.getFileName()), StandardCopyOption.REPLACE_EXISTING);
199199
} catch (IOException ex) {
200-
throw new IOException("Failed to move " + src + " to " + targetDirectory + " - " + ex.getMessage());
200+
throw new IOException("Failed to move " + src + " to " + targetDirectory + " - " + ex.getMessage(), ex);
201201
}
202202
}
203203
}

0 commit comments

Comments
 (0)