Package io.sentry.spring
Class SentryExceptionResolver
- java.lang.Object
-
- io.sentry.spring.SentryExceptionResolver
-
- All Implemented Interfaces:
org.springframework.core.Ordered
,org.springframework.web.servlet.HandlerExceptionResolver
public class SentryExceptionResolver extends java.lang.Object implements org.springframework.web.servlet.HandlerExceptionResolver, org.springframework.core.Ordered
HandlerExceptionResolver
implementation that will record any exception that a SpringController
throws to Sentry. It then returns null, which will let the other (default or custom) exception resolvers handle the actual error.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MECHANISM_TYPE
-
Constructor Summary
Constructors Constructor Description SentryExceptionResolver(@NotNull io.sentry.IHub hub, int order)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOrder()
@Nullable org.springframework.web.servlet.ModelAndView
resolveException(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @Nullable java.lang.Object handler, @NotNull java.lang.Exception ex)
-
-
-
Field Detail
-
MECHANISM_TYPE
public static final java.lang.String MECHANISM_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolveException
@Nullable public @Nullable org.springframework.web.servlet.ModelAndView resolveException(@NotNull @NotNull javax.servlet.http.HttpServletRequest request, @NotNull @NotNull javax.servlet.http.HttpServletResponse response, @Nullable @Nullable java.lang.Object handler, @NotNull @NotNull java.lang.Exception ex)
- Specified by:
resolveException
in interfaceorg.springframework.web.servlet.HandlerExceptionResolver
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
-