public class ExceptionInterceptor extends Object implements com.atlassian.plugins.rest.common.interceptor.ResourceInterceptor
When creating a response, the client's Accept
header is matched to the resource's Produces
annotations and the first matching media type is used.
See JRADEV-2862 and JRADEV-3240.
Constructor and Description |
---|
ExceptionInterceptor(I18nHelper i18n)
Creates a new ExceptionInterceptor.
|
Modifier and Type | Method and Description |
---|---|
void |
intercept(com.atlassian.plugins.rest.common.interceptor.MethodInvocation invocation)
Intercepts the method invocation, setting the media type correctly in case of an exception.
|
public ExceptionInterceptor(I18nHelper i18n)
i18n
- a I18nHelperpublic void intercept(com.atlassian.plugins.rest.common.interceptor.MethodInvocation invocation) throws IllegalAccessException, InvocationTargetException
intercept
in interface com.atlassian.plugins.rest.common.interceptor.ResourceInterceptor
invocation
- Context information about the invocationIllegalAccessException
InvocationTargetException
Copyright © 2002-2019 Atlassian. All Rights Reserved.