use of com.tvd12.ezyhttp.server.core.annotation.TryCatch in project ezyhttp by youngmonkeys.
the class GlobalExceptionHandler method handleException.
@TryCatch(InvalidFormatException.class)
public void handleException(RequestArguments args, HttpServletRequest request, HttpServletResponse response, InvalidFormatException e) {
e.printStackTrace();
Map<String, String> data = new HashMap<>();
for (Reference reference : e.getPath()) data.put(reference.getFieldName(), "invalid");
throw new HttpBadRequestException(data);
}
Aggregations