Commit c59cb68c authored by yanzg's avatar yanzg

表结构修改

parent 82e3e2fc
...@@ -49,6 +49,15 @@ public class YzgErrorData { ...@@ -49,6 +49,15 @@ public class YzgErrorData {
return getCodeException(null, code, args); return getCodeException(null, code, args);
} }
/**
* 获取全编码
* @param code 原编码
* @return 返回值
*/
public String getFullCode(String code){
return TAG + code;
}
/** /**
* 抛出异常 * 抛出异常
* *
...@@ -58,9 +67,9 @@ public class YzgErrorData { ...@@ -58,9 +67,9 @@ public class YzgErrorData {
public CodeException getCodeException(Throwable ex, String code, Object... args) { public CodeException getCodeException(Throwable ex, String code, Object... args) {
String message = getMessage(ErrorCode, code, args); String message = getMessage(ErrorCode, code, args);
if (ex != null) { if (ex != null) {
return new CodeException(TAG + code, message, ex); return new CodeException(getFullCode(code), message, ex);
} else { } else {
return new CodeException(TAG + code, message); return new CodeException(getFullCode(code), message);
} }
} }
...@@ -86,9 +95,9 @@ public class YzgErrorData { ...@@ -86,9 +95,9 @@ public class YzgErrorData {
public CodeTargetException getCodeTargetException(Throwable ex, String code, Object target, Object... args) { public CodeTargetException getCodeTargetException(Throwable ex, String code, Object target, Object... args) {
String message = getMessage(ErrorCode, code, args); String message = getMessage(ErrorCode, code, args);
if (ex != null) { if (ex != null) {
return new CodeTargetException(TAG + code, message, target, ex); return new CodeTargetException(getFullCode(code), message, target, ex);
} else { } else {
return new CodeTargetException(TAG + code, message, target); return new CodeTargetException(getFullCode(code), message, target);
} }
} }
...@@ -111,9 +120,9 @@ public class YzgErrorData { ...@@ -111,9 +120,9 @@ public class YzgErrorData {
public RuntimeCodeException getRuntimeException(Throwable ex, String code, Object... args) { public RuntimeCodeException getRuntimeException(Throwable ex, String code, Object... args) {
String message = getMessage(ErrorCode, code, args); String message = getMessage(ErrorCode, code, args);
if (ex != null) { if (ex != null) {
return new RuntimeCodeException(TAG + code, message, ex); return new RuntimeCodeException(getFullCode(code), message, ex);
} else { } else {
return new RuntimeCodeException(TAG + code, message); return new RuntimeCodeException(getFullCode(code), message);
} }
} }
......
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