Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
b0a6d5b7
Commit
b0a6d5b7
authored
Aug 10, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实例化关系
parent
cae107f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
CodeException.java
...in/java/com/yanzuoguang/util/exception/CodeException.java
+1
-1
ExceptionHelper.java
.../java/com/yanzuoguang/util/exception/ExceptionHelper.java
+2
-2
RuntimeCodeException.java
.../com/yanzuoguang/util/exception/RuntimeCodeException.java
+11
-11
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/exception/CodeException.java
View file @
b0a6d5b7
...
...
@@ -5,7 +5,7 @@ package com.yanzuoguang.util.exception;
*
* @author 颜佐光
*/
public
class
CodeException
extends
RuntimeCodeE
rror
{
public
class
CodeException
extends
RuntimeCodeE
xception
{
/**
* Constructs a new runtime exception with the specified detail message and
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/exception/ExceptionHelper.java
View file @
b0a6d5b7
...
...
@@ -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
Runtime
CodeException
)
{
RuntimeCodeException
code
=
(
Runtime
CodeException
)
e
;
return
getError
(
code
.
getCode
(),
code
.
getMessage
(),
code
.
getTarget
(),
isFull
);
}
else
{
String
msg
=
e
.
getMessage
();
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/exception/RuntimeCodeE
rror
.java
→
yzg-util-base/src/main/java/com/yanzuoguang/util/exception/RuntimeCodeE
xception
.java
View file @
b0a6d5b7
...
...
@@ -3,7 +3,7 @@ package com.yanzuoguang.util.exception;
/**
* @author 异常错误
*/
public
class
RuntimeCodeE
rror
extends
RuntimeException
{
public
class
RuntimeCodeE
xception
extends
RuntimeException
{
/**
* 错误码
...
...
@@ -49,7 +49,7 @@ public class RuntimeCodeError extends RuntimeException {
* unknown.)
* @since 1.4
*/
public
RuntimeCodeE
rror
(
String
code
,
String
message
,
Throwable
cause
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
(
String
message
,
Object
target
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
(
String
message
,
Object
target
,
Throwable
cause
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
(
String
code
,
String
message
,
Object
target
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
(
String
code
,
String
message
,
Object
target
,
Throwable
cause
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
(
String
message
,
Throwable
cause
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
()
{
public
RuntimeCodeE
xception
()
{
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
RuntimeCodeE
rror
(
String
code
,
String
message
)
{
public
RuntimeCodeE
xception
(
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
RuntimeCodeE
rror
(
String
message
)
{
public
RuntimeCodeE
xception
(
String
message
)
{
super
(
message
);
}
...
...
@@ -186,7 +186,7 @@ public class RuntimeCodeError extends RuntimeException {
* unknown.)
* @since 1.4
*/
public
RuntimeCodeE
rror
(
Throwable
cause
)
{
public
RuntimeCodeE
xception
(
Throwable
cause
)
{
super
(
cause
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment