Skip to content

Commit

Permalink
Unable to parse input ABI file fix (#1299)
Browse files Browse the repository at this point in the history
* Fix Parser

* Added Message for ignored abi files
  • Loading branch information
AlexandrouR authored Dec 1, 2020
1 parent 4a5038c commit b8961f2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ public final void generate() throws IOException, ClassNotFoundException {
}
List<AbiDefinition> functionDefinitions = loadContractDefinition(abiFile);

if (functionDefinitions.isEmpty()) {
exitError("Unable to parse input ABI file");
} else {
if (!functionDefinitions.isEmpty()) {

String className = Strings.capitaliseFirstLetter(contractName);
System.out.print("Generating " + basePackageName + "." + className + " ... ");

Expand All @@ -149,6 +148,8 @@ public final void generate() throws IOException, ClassNotFoundException {
null);

System.out.println("File written to " + destinationDirLocation.toString() + "\n");
} else {
System.out.println("Ignoring empty ABI file: " + abiFile.getName() + ".abi" + "\n");
}
}

Expand Down

0 comments on commit b8961f2

Please sign in to comment.