package org.libresonic.player.spring;
import org.libresonic.player.Logger;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class LoggingExceptionResolver implements HandlerExceptionResolver, Ordered {
private static final Logger logger = Logger.getLogger(LoggingExceptionResolver.class);
@Override
public ModelAndView resolveException(
HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e
) {
logger.error("Exception occurred", e);
return null;
}
@Override
public int getOrder() {
return Integer.MIN_VALUE;
}
}