<commit_before>package uk.ac.ebi.atlas.widget;

import org.springframework.dao.RecoverableDataAccessException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.servlet.ModelAndView;
import uk.ac.ebi.atlas.web.controllers.ResourceNotFoundException;

public abstract class HeatmapWidgetErrorHandler {

    @ExceptionHandler(value = {ResourceNotFoundException.class})
    @ResponseStatus(value = HttpStatus.NOT_FOUND)
    public ModelAndView widgetSpecific404(Exception e) {
        ModelAndView mav = new ModelAndView("widget-error");
        mav.addObject("errorMessage", e.getMessage());

        return mav;
    }

    @ExceptionHandler(value = {RecoverableDataAccessException.class})
    @ResponseStatus(value = HttpStatus.NOT_FOUND)
    public ModelAndView blah(Exception e) {
        ModelAndView mav = new ModelAndView("widget-error");
        mav.addObject("errorMessage", e.getMessage());

        return mav;
    }
}<commit_msg>Use exceptionMessage for the widget error page as all other error pages<commit_after>package uk.ac.ebi.atlas.widget;

import org.springframework.dao.RecoverableDataAccessException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.servlet.ModelAndView;
import uk.ac.ebi.atlas.web.controllers.ResourceNotFoundException;

public abstract class HeatmapWidgetErrorHandler {

    @ExceptionHandler(value = {ResourceNotFoundException.class})
    @ResponseStatus(value = HttpStatus.NOT_FOUND)
    public ModelAndView widgetSpecific404(Exception e) {
        ModelAndView mav = new ModelAndView("widget-error");
        mav.addObject("exceptionMessage", e.getMessage());

        return mav;
    }

    @ExceptionHandler(value = {RecoverableDataAccessException.class})
    @ResponseStatus(value = HttpStatus.NOT_FOUND)
    public ModelAndView blah(Exception e) {
        ModelAndView mav = new ModelAndView("widget-error");
        mav.addObject("exceptionMessage", e.getMessage());

        return mav;
    }
}
{'fraction_non_alphanumeric': 0.09795191451469279, 'fraction_numerical': 0.0026714158504007124, 'mean_word_length': 4.821243523316062, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6542692', 'n_tokens_mistral': 627, 'n_tokens_neox': 615, 'n_words': 111}