This commit is contained in:
xiangwb
2018-04-09 14:53:51 +08:00
parent 374d80b795
commit bb85fcf821
3 changed files with 26 additions and 51 deletions
@@ -2,6 +2,7 @@ package com.xwbing.handler;
import com.alibaba.fastjson.JSONObject;
import com.xwbing.exception.BusinessException;
import com.xwbing.exception.PayException;
import com.xwbing.exception.UtilException;
import com.xwbing.util.JsonResult;
import org.slf4j.Logger;
@@ -64,6 +65,20 @@ public class GlobalExceptionHandler {
return JsonResult.toJSONObj(ex.getMessage());
}
/**
* 线上支付异常
*
* @param ex
* @return
*/
@ExceptionHandler(value = PayException.class)
@ResponseStatus(value = HttpStatus.OK)
@ResponseBody
public JSONObject handlerPayException(PayException ex) {
logger.error(ex.getMessage());
return JsonResult.toJSONObj(ex.getMessage());
}
/**
* CompletableFuture完成结果或任务过程中出现的异常
*