Print correct exception when hotspot dump fails

This commit is contained in:
Shane Freeder 2024-07-22 15:42:42 +01:00
parent a4476253ab
commit 44b1e0c6f9
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C

View File

@ -379,7 +379,7 @@ public final class VelocityCommand {
this.heapGenerator.invoke(hotspotMbean, file.toString(), true);
} catch (Throwable e1) {
// This should not occur
throw new RuntimeException(e);
throw new RuntimeException(e1);
}
src.sendMessage(Component.text("Heap dump saved to " + file, NamedTextColor.GREEN));
};