🔇 无效的驱动器不输出异常信息,仅返回给页面错误消息

This commit is contained in:
zhaojun1998
2021-02-03 21:06:38 +08:00
parent 5b075c3505
commit ed64910a53

View File

@@ -52,6 +52,17 @@ public class GlobleExceptionHandler {
}
/**
* 无效的驱动器异常
*/
@ExceptionHandler({InvalidDriveException.class})
@ResponseBody
@ResponseStatus
public ResultBean invalidDriveException(InvalidDriveException ex) {
return ResultBean.error(ex.getMessage());
}
/**
* 文件预览异常
*/