Skip to content

Commit

Permalink
DEV2-4384 - get the name of the type (#695)
Browse files Browse the repository at this point in the history
* get the name of the type

* fmt
  • Loading branch information
dimacodota authored Nov 30, 2023
1 parent 429a81d commit b746e28
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public <R> R readResponse(Class<R> responseClass)
try {
return Optional.ofNullable(gson.fromJson(rawResponse, responseClass))
.orElseThrow(
() -> new TabNineInvalidResponseException("Binary returned null as a response"));
() ->
new TabNineInvalidResponseException(
format(
"Binary returned null as a response for %s",
responseClass.getSimpleName())));
} catch (TabNineInvalidResponseException | JsonSyntaxException e) {
throw new TabNineInvalidResponseException(
format("Binary returned illegal response: %s", rawResponse), e, rawResponse);
Expand Down

0 comments on commit b746e28

Please sign in to comment.