Commit 7daedb71 authored by 张永's avatar 张永

1

parent 1c4cc79b
package com.egolm.common.exception;
public class XFault extends RuntimeException {
private static final long serialVersionUID = 1L;
private int code = 500;
public XFault(String msg) {
super(msg);
}
public XFault(String msg, Throwable e) {
super(msg, e);
}
public XFault(String msg, int code) {
super(msg);
this.code = code;
}
public XFault(String msg, int code, Throwable e) {
super(msg, e);
this.code = code;
}
public static void assertNotBlank(String message, Object... objs) {
for(Object obj : objs) {
if(obj == null || obj.toString().trim().equals("")) {
throw new XFault((message == null || message.trim().equals("")) ? "对象不能为空" : message);
}
}
}
public int getCode() {
return code;
}
}
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