All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.histone.v2.spring.processors.ParsingHistoneProcessingExceptionProcessor Maven / Gradle / Ivy

package ru.histone.v2.spring.processors;

import ru.histone.v2.exceptions.ParserException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Aleksander Melnichnikov
 */
public class ParsingHistoneProcessingExceptionProcessor extends HistoneProcessingExceptionProcessor {

    @Override
    protected boolean supports(Class type) {
        return ParserException.class.isAssignableFrom(type);
    }

    @Override
    protected void processInternal(HttpServletRequest request, HttpServletResponse response,
                                   Exception exception, String templateLocation) throws Exception {
        throw new RuntimeException("Error evaluating histone template '" + templateLocation + "' in line "
                + ((ParserException) exception).getLine() + ": " + exception.getMessage(), exception);
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy