Skip to content

Commit

Permalink
Print file locks in more cases during decompile (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 authored Apr 17, 2024
1 parent 7010ad6 commit e142cb8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ public void run() throws IOException {
if (!getUseCache().get()) {
try (var timer = new Timer("Decompiled sources")) {
runWithoutCache();
} catch (Exception e) {
ExceptionUtil.printFileLocks(e, getProject());
throw ExceptionUtil.createDescriptiveWrapper(RuntimeException::new, "Failed to decompile", e);
}

return;
Expand All @@ -218,6 +221,9 @@ public void run() throws IOException {
try (FileSystemUtil.Delegate fs = FileSystemUtil.getJarFileSystem(cacheFile, true)) {
runWithCache(fs.getRoot());
}
} catch (Exception e) {
ExceptionUtil.printFileLocks(e, getProject());
throw ExceptionUtil.createDescriptiveWrapper(RuntimeException::new, "Failed to decompile", e);
}
}

Expand Down Expand Up @@ -415,7 +421,6 @@ private MinecraftJar rebuildInputJar() {
final var provideContext = new AbstractMappedMinecraftProvider.ProvideContext(false, true, configContext);
minecraftJars = getExtension().getNamedMinecraftProvider().provide(provideContext);
} catch (Exception e) {
ExceptionUtil.printFileLocks(e, getProject());
throw ExceptionUtil.createDescriptiveWrapper(RuntimeException::new, "Failed to rebuild input jars", e);
}

Expand Down

0 comments on commit e142cb8

Please sign in to comment.