cli: update jcommander lib

This commit is contained in:
Skylot
2018-02-13 15:31:49 +03:00
parent ab040d36d5
commit 8446d016e4
9 changed files with 132 additions and 51 deletions
+7 -1
View File
@@ -4,6 +4,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import jadx.api.JadxDecompiler;
import jadx.core.utils.exceptions.JadxArgsValidateException;
public class JadxCLI {
private static final Logger LOG = LoggerFactory.getLogger(JadxCLI.class);
@@ -22,7 +23,12 @@ public class JadxCLI {
static void processAndSave(JadxCLIArgs inputArgs) {
JadxDecompiler jadx = new JadxDecompiler(inputArgs.toJadxArgs());
jadx.load();
try {
jadx.load();
} catch (JadxArgsValidateException e) {
LOG.error("Incorrect arguments: {}", e.getMessage());
System.exit(1);
}
jadx.save();
if (jadx.getErrorsCount() != 0) {
jadx.printErrorsReport();