Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
common
Project
Project
Details
Activity
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
曲欣亮
common
Commits
7daedb71
Commit
7daedb71
authored
Dec 27, 2021
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1c4cc79b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
XFault.java
src/main/java/com/egolm/common/exception/XFault.java
+39
-0
No files found.
src/main/java/com/egolm/common/exception/XFault.java
0 → 100644
View file @
7daedb71
package
com
.
egolm
.
common
.
exception
;
public
class
XFault
extends
RuntimeException
{
private
static
final
long
serialVersionUID
=
1L
;
private
int
code
=
500
;
public
XFault
(
String
msg
)
{
super
(
msg
);
}
public
XFault
(
String
msg
,
Throwable
e
)
{
super
(
msg
,
e
);
}
public
XFault
(
String
msg
,
int
code
)
{
super
(
msg
);
this
.
code
=
code
;
}
public
XFault
(
String
msg
,
int
code
,
Throwable
e
)
{
super
(
msg
,
e
);
this
.
code
=
code
;
}
public
static
void
assertNotBlank
(
String
message
,
Object
...
objs
)
{
for
(
Object
obj
:
objs
)
{
if
(
obj
==
null
||
obj
.
toString
().
trim
().
equals
(
""
))
{
throw
new
XFault
((
message
==
null
||
message
.
trim
().
equals
(
""
))
?
"对象不能为空"
:
message
);
}
}
}
public
int
getCode
()
{
return
code
;
}
}
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