Commit b0a6d5b7 authored by yanzg's avatar yanzg

修改实例化关系

parent cae107f8
......@@ -5,7 +5,7 @@ package com.yanzuoguang.util.exception;
*
* @author 颜佐光
*/
public class CodeException extends RuntimeCodeError {
public class CodeException extends RuntimeCodeException {
/**
* Constructs a new runtime exception with the specified detail message and
......
......@@ -66,8 +66,8 @@ public class ExceptionHelper {
* @return 返回的数据
*/
public static ResponseResult getError(Exception e, boolean isFull) {
if (e instanceof CodeException) {
CodeException code = (CodeException) e;
if (e instanceof RuntimeCodeException) {
RuntimeCodeException code = (RuntimeCodeException) e;
return getError(code.getCode(), code.getMessage(), code.getTarget(), isFull);
} else {
String msg = e.getMessage();
......
......@@ -3,7 +3,7 @@ package com.yanzuoguang.util.exception;
/**
* @author 异常错误
*/
public class RuntimeCodeError extends RuntimeException {
public class RuntimeCodeException extends RuntimeException {
/**
* 错误码
......@@ -49,7 +49,7 @@ public class RuntimeCodeError extends RuntimeException {
* unknown.)
* @since 1.4
*/
public RuntimeCodeError(String code, String message, Throwable cause) {
public RuntimeCodeException(String code, String message, Throwable cause) {
super(message, cause);
this.code = code;
}
......@@ -62,7 +62,7 @@ public class RuntimeCodeError extends RuntimeException {
* @param message  错误消息
* @param target  错误数据源,如订单数据
*/
public RuntimeCodeError(String message, Object target) {
public RuntimeCodeException(String message, Object target) {
super(message);
this.target = target;
}
......@@ -79,7 +79,7 @@ public class RuntimeCodeError extends RuntimeException {
* permitted, and indicates that the cause is nonexistent or
* unknown.)
*/
public RuntimeCodeError(String message, Object target, Throwable cause) {
public RuntimeCodeException(String message, Object target, Throwable cause) {
super(message, cause);
this.target = target;
}
......@@ -93,7 +93,7 @@ public class RuntimeCodeError extends RuntimeException {
* @param message  错误消息
* @param target  错误数据源,如订单数据
*/
public RuntimeCodeError(String code, String message, Object target) {
public RuntimeCodeException(String code, String message, Object target) {
super(message);
this.code = code;
this.target = target;
......@@ -112,7 +112,7 @@ public class RuntimeCodeError extends RuntimeException {
* permitted, and indicates that the cause is nonexistent or
* unknown.)
*/
public RuntimeCodeError(String code, String message, Object target, Throwable cause) {
public RuntimeCodeException(String code, String message, Object target, Throwable cause) {
super(message, cause);
this.code = code;
this.target = target;
......@@ -132,7 +132,7 @@ public class RuntimeCodeError extends RuntimeException {
* unknown.)
* @since 1.4
*/
public RuntimeCodeError(String message, Throwable cause) {
public RuntimeCodeException(String message, Throwable cause) {
super(message, cause);
}
......@@ -142,7 +142,7 @@ public class RuntimeCodeError extends RuntimeException {
* detail message. The cause is not initialized, and may subsequently be
* initialized by a call to {@link #initCause}.
*/
public RuntimeCodeError() {
public RuntimeCodeException() {
super();
}
......@@ -156,7 +156,7 @@ public class RuntimeCodeError extends RuntimeException {
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public RuntimeCodeError(String code, String message) {
public RuntimeCodeException(String code, String message) {
super(message);
this.code = code;
}
......@@ -169,7 +169,7 @@ public class RuntimeCodeError extends RuntimeException {
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public RuntimeCodeError(String message) {
public RuntimeCodeException(String message) {
super(message);
}
......@@ -186,7 +186,7 @@ public class RuntimeCodeError extends RuntimeException {
* unknown.)
* @since 1.4
*/
public RuntimeCodeError(Throwable cause) {
public RuntimeCodeException(Throwable cause) {
super(cause);
}
}
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