Commit 7475e1de authored by Quxl's avatar Quxl

x

parent fe40a7e6
......@@ -35,6 +35,7 @@ import com.egolm.film.bean.Fc_member_film_show;
import com.egolm.film.bean.model.Fc_member_film_base_model;
import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XException;
import com.egolm.film.config.XRException;
import com.egolm.film.util.SqlWhere;
......@@ -602,7 +603,7 @@ public class FilmServiceImpl implements FilmService {
str = "否决";
}
int state = film.getApply_state().intValue();
throw new XException("该片名已经在" + DateUtil.format(new Date(passtime*1000), "yyyy年MM月dd日HH") + "时被管理员" + str + (state == 2 ? ",通过的影片ID号为" + no : ""));
throw new XRException("该片名已经在" + DateUtil.format(new Date(passtime*1000), "yyyy年MM月dd日HH") + "时被管理员" + str + (state == 2 ? ",通过的影片ID号为" + no : ""));
}
}
}
......
......@@ -28,7 +28,7 @@ public class ExceptionHandler implements HandlerExceptionResolver {
if(rjx.getCode() == 200) {
displayInLog = false;
}
if(rjx.getCode() == 300) {
if(rjx.getCode() == 300 || ex instanceof XRException) {
displayInLog = false;
logger.debug(ex.getMessage());
}
......
......@@ -6,7 +6,7 @@ public class XException extends RuntimeException {
private static final long serialVersionUID = 1L;
private Rjx rjx = Rjx.jsonErr().setCode(500).setMessage("operation failed");
protected Rjx rjx = Rjx.jsonErr().setCode(500).setMessage("operation failed");
public XException(String msg) {
super(msg);
......
package com.egolm.film.config;
import com.egolm.common.bean.Rjx;
public class XRException extends XException {
private static final long serialVersionUID = 1L;
public XRException(String msg) {
super(msg);
rjx.setMessage(msg);
}
public XRException(String msg, Throwable e) {
super(msg, e);
rjx.setMessage(msg);
}
public XRException(String msg, int code) {
super(msg);
rjx.setMessage(msg);
rjx.setCode(code);
}
public XRException(String msg, int code, Throwable e) {
super(msg, e);
rjx.setMessage(msg);
rjx.setCode(code);
}
public Rjx getRjx() {
return rjx;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment