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
f45d438a
Commit
f45d438a
authored
Aug 06, 2019
by
WeiWei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化异常配置
parent
b387cf5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
ApplicationExceptionConfiguration.java
...core/configuration/ApplicationExceptionConfiguration.java
+3
-4
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/core/configuration/ApplicationExceptionConfiguration.java
View file @
f45d438a
...
@@ -16,8 +16,6 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
...
@@ -16,8 +16,6 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
java.util.Objects
;
/**
/**
* 应用系统异常配置
* 应用系统异常配置
* <p>
* <p>
...
@@ -95,11 +93,12 @@ public class ApplicationExceptionConfiguration {
...
@@ -95,11 +93,12 @@ public class ApplicationExceptionConfiguration {
@ExceptionHandler
({
Throwable
.
class
})
@ExceptionHandler
({
Throwable
.
class
})
public
Result
generalException
(
Throwable
e
)
{
public
Result
generalException
(
Throwable
e
)
{
Throwable
cause
=
e
.
getCause
()
;
Throwable
cause
=
e
;
while
(
Objects
.
nonNull
(
cause
.
getCause
())
)
{
while
(
(
cause
=
cause
.
getCause
())
!=
null
)
{
if
(
cause
instanceof
ApplicationException
)
{
if
(
cause
instanceof
ApplicationException
)
{
cause
=
cause
.
getCause
();
cause
=
cause
.
getCause
();
break
;
}
}
}
}
...
...
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