|
@@ -13,6 +13,7 @@ import cn.com.qmth.examcloud.commons.util.JsonUtil;
|
|
|
public class StatusException extends RuntimeException {
|
|
|
private static final long serialVersionUID = 5003047488500388819L;
|
|
|
|
|
|
+ private static final String DEF_CODE="500";
|
|
|
/**
|
|
|
* 追踪ID
|
|
|
*/
|
|
@@ -45,6 +46,12 @@ public class StatusException extends RuntimeException {
|
|
|
this.code = code;
|
|
|
this.desc = desc;
|
|
|
}
|
|
|
+
|
|
|
+ public StatusException( String desc) {
|
|
|
+ super("[code: " + DEF_CODE + "; desc: " + desc + "]");
|
|
|
+ this.code = DEF_CODE;
|
|
|
+ this.desc = desc;
|
|
|
+ }
|
|
|
|
|
|
public String getCode() {
|
|
|
return code;
|