Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
24329497
Commit
24329497
authored
Nov 14, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常处理
parent
9668bcf5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
GlobalExceptionHandler.java
...iaoqi/security/common/handler/GlobalExceptionHandler.java
+2
-2
PlatformExceptionHandler.java
...oqi/security/common/handler/PlatformExceptionHandler.java
+1
-1
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/GlobalExceptionHandler.java
View file @
24329497
...
...
@@ -69,7 +69,7 @@ public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
if
(
0
==
ex
.
getStatus
())
{
response
.
setStatus
(
500
);
}
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
ex
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
ex
.
getStackTrace
().
toString
()
);
return
new
BaseResponse
(
ex
.
getStatus
(),
ex
.
getMessage
());
}
...
...
@@ -85,7 +85,7 @@ public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
stringWriter
.
toString
());
return
new
BaseResponse
(
5000
,
"Server exception: "
+
ex
.
getMessage
());
}
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
ex
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
ex
.
getStackTrace
().
toString
()
);
return
new
BaseResponse
(
CommonConstants
.
EX_OTHER_CODE
,
ex
.
getMessage
());
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/handler/PlatformExceptionHandler.java
View file @
24329497
...
...
@@ -38,7 +38,7 @@ public class PlatformExceptionHandler {
return
assembleResult
(
ObjectRestResponse
.
createFailedResult
(
5000
,
"服务器开小差了,请稍后重试!"
),
"Server exception: "
+
e
.
getMessage
());
}
log
.
error
(
"Server exception: "
,
e
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
e
);
HttpRequestUtil
.
httpGet
(
"http://10.5.52.3:8765/api/universal/mail/app/unauth/send?toUser=jiaoruizhen@126.com&subject=服务器异常&content="
+
e
.
getStackTrace
().
toString
()
);
return
assembleResult
(
ObjectRestResponse
.
createFailedResult
(
5000
,
"服务器开小差了,请稍后重试!"
),
"Server exception: "
+
e
.
getMessage
());
}
...
...
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