Skip to content

Commit

Permalink
serdeのようなメッセージに
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Jan 29, 2025
1 parent ee272cc commit 4d5bbb1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public StyleType deserialize(JsonElement json, Type typeOfT, JsonDeserialization
case "sing":
return SING;
default:
throw new JsonParseException(String.format("Invalid value: `%s`", value));
throw new JsonParseException(
String.format(
"Invalid variant: `%s`, expected one of "
+ "`talk`, `singing_teacher`, `frame_decode`, `sing`",
value));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ public Type deserialize(
case "SUFFIX":
return SUFFIX;
default:
throw new JsonParseException(String.format("Invalid value: `%s`", value));
throw new JsonParseException(
String.format(
"Invalid variant `%s`, expected one of "
+ "`PROPER_NOUN`, `COMMON_NOUN`, `VERB`, `ADJECTIVE`, `SUFFIX`",
value));
}
}
}
Expand Down

0 comments on commit 4d5bbb1

Please sign in to comment.