Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
6fd38535
Commit
6fd38535
authored
Aug 06, 2019
by
WeiWei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提出不用的代码
parent
362c2909
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
ApplicationExceptionConfiguration.java
...core/configuration/ApplicationExceptionConfiguration.java
+2
-13
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/core/configuration/ApplicationExceptionConfiguration.java
View file @
6fd38535
...
...
@@ -36,7 +36,6 @@ public class ApplicationExceptionConfiguration {
*/
@ExceptionHandler
({
ApplicationException
.
class
})
public
Result
applicationExceptionHandler
(
ApplicationException
e
)
{
log
.
error
(
"程序员开小差了,系统异常信息:{}"
,
e
.
getMessage
());
return
new
Result
<>(
e
.
getStatus
(),
null
,
e
.
getStatus
().
getMessage
());
}
...
...
@@ -96,19 +95,9 @@ public class ApplicationExceptionConfiguration {
@ExceptionHandler
({
Throwable
.
class
})
public
Result
generalException
(
Throwable
e
)
{
Throwable
cause
=
e
;
log
.
error
(
e
.
getMessage
(),
e
)
;
while
((
cause
=
cause
.
getCause
())
!=
null
)
{
if
(
ApplicationException
.
class
.
isAssignableFrom
(
cause
.
getClass
()))
{
cause
=
cause
.
getCause
();
break
;
}
}
String
errorMessage
=
ApplicationException
.
class
.
isAssignableFrom
(
e
.
getClass
())
?
cause
.
getMessage
()
:
e
.
getMessage
();
log
.
error
(
"程序员开小差了,未明确的异常信息:{}"
,
e
);
return
new
Result
<>(
ApplicationStatus
.
INTERNAL_SERVICE_ERROR
,
ApplicationStatus
.
INTERNAL_SERVICE_ERROR
.
getMessage
());
return
new
Result
<>(
ApplicationStatus
.
INTERNAL_SERVICE_ERROR
);
}
...
...
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