<commit_before>package org.crunchytorch.coddy.application.exception.handler;

import org.crunchytorch.coddy.application.data.Response;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

public interface IExceptionHandler<T extends Throwable> {

    ResponseEntity<Response> handler(T t);

    default ResponseEntity<Response> handler(T t, HttpStatus status) {
        return new ResponseEntity<>(new Response(t.getMessage()), status);
    }
}
<commit_msg>add handler method with message as parameter<commit_after>package org.crunchytorch.coddy.application.exception.handler;

import org.crunchytorch.coddy.application.data.Response;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

public interface IExceptionHandler<T extends Throwable> {

    ResponseEntity<Response> handler(T t);

    default ResponseEntity<Response> handler(T t, HttpStatus status) {
        return this.handler(t.getMessage(), status);
    }

    default ResponseEntity<Response> handler(String message, HttpStatus status) {
        return new ResponseEntity<>(new Response(message), status);
    }
}

{'fraction_non_alphanumeric': 0.09655172413793103, 'fraction_numerical': 0.0, 'mean_word_length': 5.45, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '1570913', 'n_tokens_mistral': 312, 'n_tokens_neox': 310, 'n_words': 69}