Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
decompiler improve
Browse files Browse the repository at this point in the history
  • Loading branch information
TerriblePanda committed Sep 27, 2019
1 parent 3152f27 commit 2f7c9bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/me/grax/jbytemod/decompiler/Decompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ protected String decompile(ClassNode cn, MethodNode mn) {
// do not regenerate anything here
ClassWriter cw = new ClassWriter(0);
cn.accept(cw);
return decompile(cw.toByteArray(), mn);
try{
return decompile(cw.toByteArray(), mn);
}catch(Exception exception){
return "Failed to decompile, reason: " + exception.getMessage();
}

}

public abstract String decompile(byte[] b, MethodNode mn);
Expand Down

0 comments on commit 2f7c9bd

Please sign in to comment.