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
5ee7bdd0
Commit
5ee7bdd0
authored
Mar 20, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
状态异常类
parent
60237a90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
StatusException.java
.../java/com/yanzuoguang/util/exception/StatusException.java
+12
-12
No files found.
src/main/java/com/yanzuoguang/util/exception/StatusException.java
View file @
5ee7bdd0
...
@@ -9,7 +9,7 @@ public class StatusException extends RuntimeException {
...
@@ -9,7 +9,7 @@ public class StatusException extends RuntimeException {
/**
/**
* 错误状态码
* 错误状态码
*/
*/
private
int
code
;
private
int
status
;
/**
/**
* 错误结果
* 错误结果
...
@@ -93,44 +93,44 @@ public class StatusException extends RuntimeException {
...
@@ -93,44 +93,44 @@ public class StatusException extends RuntimeException {
/**
/**
* 途必达自定义异常
* 途必达自定义异常
*
*
* @param
code
错误码
* @param
status
错误码
* @param format 格式化字符串
* @param format 格式化字符串
* @param paras 参数
* @param paras 参数
*/
*/
public
StatusException
(
int
code
,
String
format
,
Object
...
paras
)
{
public
StatusException
(
int
status
,
String
format
,
Object
...
paras
)
{
super
(
String
.
format
(
format
,
paras
));
super
(
String
.
format
(
format
,
paras
));
this
.
result
=
null
;
this
.
result
=
null
;
this
.
code
=
code
;
this
.
status
=
status
;
}
}
/**
/**
* 途必达自定义异常
* 途必达自定义异常
*
*
* @param result 结果
* @param result 结果
* @param
code
错误码
* @param
status
错误码
* @param format 格式化字符串
* @param format 格式化字符串
* @param paras 参数
* @param paras 参数
*/
*/
public
StatusException
(
Object
result
,
int
code
,
String
format
,
Object
...
paras
)
{
public
StatusException
(
Object
result
,
int
status
,
String
format
,
Object
...
paras
)
{
super
(
String
.
format
(
format
,
paras
));
super
(
String
.
format
(
format
,
paras
));
this
.
result
=
result
;
this
.
result
=
result
;
this
.
code
=
code
;
this
.
status
=
status
;
}
}
/**
/**
* 获取状态
* 获取状态
* @return
* @return
*/
*/
public
int
get
Code
()
{
public
int
get
Status
()
{
return
code
;
return
status
;
}
}
/**
/**
* 状态码
* 状态码
* @param
code
* @param
status
*/
*/
public
void
set
Code
(
int
code
)
{
public
void
set
Status
(
int
status
)
{
this
.
code
=
code
;
this
.
status
=
status
;
}
}
/**
/**
...
...
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