Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
head_group
xyqb-user2
Commits
c13ba89e
Commit
c13ba89e
authored
Jul 20, 2022
by
李健华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/sentry-exclude-exception-20220720' into 'master'
sentry 上报排除一些异常 See merge request
!82
parents
2cb54fb0
e091d409
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
CustomSentryExceptionResolver.java
...oup/xyqb/config/sentry/CustomSentryExceptionResolver.java
+4
-5
No files found.
src/main/java/cn/quantgroup/xyqb/config/sentry/CustomSentryExceptionResolver.java
View file @
c13ba89e
package
cn
.
quantgroup
.
xyqb
.
config
.
sentry
;
import
cn.quantgroup.xyqb.exception.
VerificationCodeErrorException
;
import
cn.quantgroup.xyqb.exception.
*
;
import
io.sentry.Sentry
;
import
org.springframework.core.Ordered
;
import
org.springframework.security.authentication.BadCredentialsException
;
...
...
@@ -17,16 +17,15 @@ import javax.servlet.http.HttpServletResponse;
* the actual error.
*/
public
class
CustomSentryExceptionResolver
implements
HandlerExceptionResolver
,
Ordered
{
@Override
public
ModelAndView
resolveException
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
{
// TODO: 2020/2/4 临时测试,后期修改成通用。
if
(
ex
instanceof
VerificationCodeErrorException
)
{
return
null
;
}
if
(
ex
instanceof
BadCredentialsException
)
{
if
(
ex
instanceof
VerificationCodeErrorException
||
ex
instanceof
DataException
||
ex
instanceof
UserRegisterLoginException
||
ex
instanceof
AppletException
||
ex
instanceof
AccessForbiddenException
||
ex
instanceof
PasswordErrorLimitException
||
ex
instanceof
BadCredentialsException
)
{
return
null
;
}
...
...
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