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
c59cb68c
Commit
c59cb68c
authored
May 24, 2023
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表结构修改
parent
82e3e2fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
YzgErrorData.java
...base/src/main/java/com/yanzuoguang/util/YzgErrorData.java
+15
-6
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/YzgErrorData.java
View file @
c59cb68c
...
...
@@ -49,6 +49,15 @@ public class YzgErrorData {
return
getCodeException
(
null
,
code
,
args
);
}
/**
* 获取全编码
* @param code 原编码
* @return 返回值
*/
public
String
getFullCode
(
String
code
){
return
TAG
+
code
;
}
/**
* 抛出异常
*
...
...
@@ -58,9 +67,9 @@ public class YzgErrorData {
public
CodeException
getCodeException
(
Throwable
ex
,
String
code
,
Object
...
args
)
{
String
message
=
getMessage
(
ErrorCode
,
code
,
args
);
if
(
ex
!=
null
)
{
return
new
CodeException
(
TAG
+
code
,
message
,
ex
);
return
new
CodeException
(
getFullCode
(
code
)
,
message
,
ex
);
}
else
{
return
new
CodeException
(
TAG
+
code
,
message
);
return
new
CodeException
(
getFullCode
(
code
)
,
message
);
}
}
...
...
@@ -86,9 +95,9 @@ public class YzgErrorData {
public
CodeTargetException
getCodeTargetException
(
Throwable
ex
,
String
code
,
Object
target
,
Object
...
args
)
{
String
message
=
getMessage
(
ErrorCode
,
code
,
args
);
if
(
ex
!=
null
)
{
return
new
CodeTargetException
(
TAG
+
code
,
message
,
target
,
ex
);
return
new
CodeTargetException
(
getFullCode
(
code
)
,
message
,
target
,
ex
);
}
else
{
return
new
CodeTargetException
(
TAG
+
code
,
message
,
target
);
return
new
CodeTargetException
(
getFullCode
(
code
)
,
message
,
target
);
}
}
...
...
@@ -111,9 +120,9 @@ public class YzgErrorData {
public
RuntimeCodeException
getRuntimeException
(
Throwable
ex
,
String
code
,
Object
...
args
)
{
String
message
=
getMessage
(
ErrorCode
,
code
,
args
);
if
(
ex
!=
null
)
{
return
new
RuntimeCodeException
(
TAG
+
code
,
message
,
ex
);
return
new
RuntimeCodeException
(
getFullCode
(
code
)
,
message
,
ex
);
}
else
{
return
new
RuntimeCodeException
(
TAG
+
code
,
message
);
return
new
RuntimeCodeException
(
getFullCode
(
code
)
,
message
);
}
}
...
...
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