异常自定义,code

glusterfs-api
chenlw 9 years ago
parent d7da61c394
commit 91268a91e9

@ -19,6 +19,9 @@ public class CustomException extends Exception {
/** 自定义异常信息-错误信息 */
private String msg;
/** 自定义异常信息-错误代码 */
private String code;
/** 操作对象 */
private Object[] objArray;
@ -40,7 +43,7 @@ public class CustomException extends Exception {
super(code);
StringBuffer sbuf= new StringBuffer();
sbuf.append(msg);
this.code = code;
sbuf.append(code);
sbuf.append("\r\n");
msg = Resource.getProperties().get(code);
@ -95,6 +98,14 @@ public class CustomException extends Exception {
return msg;
}
/**
* @return the code
*/
public String getCode() {
return code;
}
/**
* @ objArray
* @return objArray

Loading…
Cancel
Save