| | |
| | | e.printStackTrace(); |
| | | return Result.fail("数字格式异常"); |
| | | } |
| | | |
| | | /** 安全异常 */ |
| | | @ExceptionHandler(SecurityException.class) |
| | | public Result<?> SecurityException(SecurityException e) { |
| | |
| | | e.printStackTrace(); |
| | | return Result.fail("数组越界异常"); |
| | | } |
| | | |
| | | /** sql语法错误异常 */ |
| | | @ExceptionHandler(BadSqlGrammarException.class) |
| | | public Result<?> BadSqlGrammarException(BadSqlGrammarException e) { |
| | |
| | | return Result.fail("网络连接失败,请退出后再试"); |
| | | } |
| | | |
| | | /** |
| | | * 权限 |
| | | * @param e |
| | | * @return |
| | | */ |
| | | @ExceptionHandler({AuthException.class}) |
| | | public Result<?> noAuth(AuthException e){ |
| | | return Result.fail(Integer.valueOf(e.getCode()),e.getMsg()); |