Skip to content

Commit

Permalink
Fix exception message
Browse files Browse the repository at this point in the history
* Add message for exception thrown when redefining custom proto adapter
  • Loading branch information
matthewdu committed Jun 27, 2016
1 parent 931a235 commit 7b2d875
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public JavaGenerator withCustomProtoAdapter(
ImmutableMap<ProtoType, ClassName> protoTypeToCustomJavaName,
ImmutableMap<ProtoType, AdapterConstant> protoTypeToAdapterConstant) {
if (!this.nameToProtoFieldsJavaName.isEmpty()) {
throw new IllegalStateException();
throw new IllegalStateException("Redefining custom proto adapter is illegal.");
}

Map<ProtoType, ClassName> nameToJavaName = new LinkedHashMap<>(this.nameToJavaName);
Expand Down

0 comments on commit 7b2d875

Please sign in to comment.