Commit b0a6d5b7 authored by yanzg's avatar yanzg

修改实例化关系

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