| | |
| | | package com.yuanchu.mom.handler; |
| | | |
| | | import com.yuanchu.mom.exception.ErrorException; |
| | | import com.yuanchu.mom.exception.MyFileException; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | }else { |
| | | msg="文件上传失败【服务器异常】"; |
| | | } |
| | | e.printStackTrace(); |
| | | return Result.fail(msg); |
| | | } |
| | | |
| | |
| | | return Result.fail("抱歉不支持【" + e.getMessage() +"】后缀的文件!"); |
| | | } |
| | | |
| | | @ExceptionHandler({ErrorException.class}) |
| | | public Result<?> errorException(Exception e) { |
| | | log.error(e.getMessage()); |
| | | return Result.fail(e.getMessage()); |
| | | } |
| | | |
| | | /** 其他错误 */ |
| | | /** |
| | | * 其他错误 |