Skip to content

Commit

Permalink
added specific exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhas Kurapati <prabhask@berkeley.edu>
  • Loading branch information
prabhask5 committed Oct 26, 2023
1 parent 7a1f7e8 commit 016759d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ protected void validateMsg(final AuditMessage msg) throws Exception {
}
}

protected void validateJson(final String json) throws Exceshption {
protected void validateJson(final String json) throws Exception {
if (json == null || json.isEmpty()) {
throw new Exception("json is either null or empty");
throw new NullPointerException("json is either null or empty");
}

JsonNode node = DefaultObjectMapper.objectMapper.readTree(json);
Expand Down

0 comments on commit 016759d

Please sign in to comment.