Files
SCM-Manager/scm-webapp/src/main/java/sonia/scm/api/ContextualFallbackExceptionMapper.java

20 lines
614 B
Java
Raw Normal View History

2019-03-29 15:39:44 +01:00
package sonia.scm.api;
import sonia.scm.ExceptionWithContext;
2020-01-15 14:00:20 +01:00
import sonia.scm.api.rest.ContextualExceptionMapper;
import sonia.scm.api.v2.resources.ExceptionWithContextToErrorDtoMapper;
2019-03-29 15:39:44 +01:00
2020-01-15 14:00:20 +01:00
import javax.inject.Inject;
2019-03-29 15:39:44 +01:00
import javax.ws.rs.ext.Provider;
2020-01-15 14:00:20 +01:00
import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR;
2019-03-29 15:39:44 +01:00
2020-01-15 14:00:20 +01:00
@Provider
public class ContextualFallbackExceptionMapper extends ContextualExceptionMapper<ExceptionWithContext> {
2019-03-29 15:39:44 +01:00
2020-01-15 14:00:20 +01:00
@Inject
public ContextualFallbackExceptionMapper(ExceptionWithContextToErrorDtoMapper mapper) {
super(ExceptionWithContext.class, INTERNAL_SERVER_ERROR, mapper);
2019-03-29 15:39:44 +01:00
}
}