Package io.sentry.spring
Class SentryExceptionResolver
java.lang.Object
io.sentry.spring.SentryExceptionResolver
- All Implemented Interfaces:
Ordered
,HandlerExceptionResolver
HandlerExceptionResolver
implementation that will record any exception that a Spring
Controller
throws to Sentry. It then returns null,
which will let the other (default or custom) exception resolvers handle the actual error.-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionSentryExceptionResolver
(@NotNull IHub hub, @NotNull TransactionNameProvider transactionNameProvider, int order) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull SentryEvent
createEvent
(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull Exception ex) protected @Nullable Hint
createHint
(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response) int
getOrder()
@Nullable ModelAndView
resolveException
(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @Nullable Object handler, @NotNull Exception ex)
-
Field Details
-
MECHANISM_TYPE
- See Also:
-
-
Constructor Details
-
SentryExceptionResolver
public SentryExceptionResolver(@NotNull @NotNull IHub hub, @NotNull @NotNull TransactionNameProvider transactionNameProvider, int order)
-
-
Method Details
-
resolveException
@Nullable public @Nullable ModelAndView resolveException(@NotNull @NotNull javax.servlet.http.HttpServletRequest request, @NotNull @NotNull javax.servlet.http.HttpServletResponse response, @Nullable @Nullable Object handler, @NotNull @NotNull Exception ex) - Specified by:
resolveException
in interfaceHandlerExceptionResolver
-
getOrder
public int getOrder() -
createEvent
@NotNull protected @NotNull SentryEvent createEvent(@NotNull @NotNull javax.servlet.http.HttpServletRequest request, @NotNull @NotNull Exception ex) -
createHint
@Nullable protected @Nullable Hint createHint(@NotNull @NotNull javax.servlet.http.HttpServletRequest request, @NotNull @NotNull javax.servlet.http.HttpServletResponse response)
-