mirror of https://github.com/alibaba/easyexcel
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
491 B
18 lines
491 B
10 months ago
|
package com.alibaba.easytools.spring.exception.convertor;
|
||
|
|
||
|
import com.alibaba.easytools.base.excption.BusinessException;
|
||
|
import com.alibaba.easytools.base.wrapper.result.ActionResult;
|
||
|
|
||
|
/**
|
||
|
* BusinessException
|
||
|
*
|
||
|
* @author 是仪
|
||
|
*/
|
||
|
public class BusinessExceptionConvertor implements ExceptionConvertor<BusinessException> {
|
||
|
|
||
|
@Override
|
||
|
public ActionResult convert(BusinessException exception) {
|
||
|
return ActionResult.fail(exception.getCode(), exception.getMessage());
|
||
|
}
|
||
|
}
|