Skip to content

Commit

Permalink
Throw new exception to handle true exception situations
Browse files Browse the repository at this point in the history
  • Loading branch information
tharikaGitHub committed May 16, 2024
1 parent ef536bc commit 50057f5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ public static BlockingConditionDTO fromBlockingConditionToDTO(
jsonObject.put(APIConstants.BLOCK_CONDITION_INVERT, Boolean.FALSE);
dto.setConditionValue(jsonObject);
} else {
// This is a true parsing exception.
// This is a true parsing exception. Hence, it will be thrown without handling.
log.error("Error parsing IP blocking condition value", e);
throw new ParseException(ParseException.ERROR_UNEXPECTED_EXCEPTION, e);
}
} else {
// This is a true parsing exception.
log.error("Error parsing IP blocking condition value", e);
// This is a true parsing exception. Hence, it will be thrown without handling.
log.error("Error parsing IP blocking condition value. The value is null.", e);
throw new ParseException(ParseException.ERROR_UNEXPECTED_EXCEPTION, e);
}
}
}
Expand Down

0 comments on commit 50057f5

Please sign in to comment.