Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
8a094cca
Commit
8a094cca
authored
Nov 09, 2019
by
qiuweili123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常策略优化
parent
eccb2f96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
AbsExceptionProcessor.java
protocol-starter/src/main/java/com/secoo/mall/common/processor/AbsExceptionProcessor.java
+7
-3
No files found.
protocol-starter/src/main/java/com/secoo/mall/common/processor/AbsExceptionProcessor.java
View file @
8a094cca
...
...
@@ -8,9 +8,13 @@ public abstract class AbsExceptionProcessor implements ExceptionProcessor {
public
void
process
(
Exception
e
)
throws
Exception
{
convertException
(
e
);
//如果不进行友好的异常转换,包装为统一的错误异常抛出
log
.
error
(
"error:"
,
e
);
throw
new
SystemInternalException
();
//如果不进行运行时异常抛出,则转换为运行时异常
if
(!(
e
instanceof
RuntimeException
))
{
log
.
error
(
"error:"
,
e
);
throw
new
SystemInternalException
();
}
throw
e
;
}
protected
abstract
void
convertException
(
Exception
e
);
...
...
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