不写try catch 亲人两行泪
要从controller层 到 service层 通通要写try catch
@POST
@Path("xxx")
public ResponseBean exportTransExcpOrder(TransExcProcessQueryVo vo) {
ResponseBean responseBean = new ResponseBean();
try {
// 这service里面可能会报错
orderService.exportListTransExcpOrder(vo, userId);
responseBean.setStatus(StatusConstants.SUCCESS);
responseBean.setErrMsg(MessageConstants.TASK_SUBMIT);
} catch (ServiceBizException e) {
// catahc 业务报错 是一些预料到的报错
logger.error(e.getErrorMessage());
responseBean = new ResponseBean(StatusConstants.FAIL, null,
e