<commit_before>package com.cookingfox.chefling.api.exception;

/**
 * Thrown when a type could not be instantiated, e.g. when type is an abstract class.
 */
public class TypeInstantiationException extends ContainerException {

    public TypeInstantiationException(Class type, Throwable cause) {
        super(String.format("Type '%s' could not be instantiated: %s",
                type.getName(), cause.getMessage()));
    }<commit_msg>Better exception message for TypeInstantiationException<commit_after>package com.cookingfox.chefling.api.exception;

/**
 * Thrown when a type could not be instantiated, e.g. when type is an abstract class.
 */
public class TypeInstantiationException extends ContainerException {

    public TypeInstantiationException(Class type, Throwable cause) {
        super(String.format("Type '%s' could not be instantiated: %s",
                type.getName(),
                cause.getMessage() != null ? cause.getMessage() : cause.getClass().getSimpleName()));
    }
{'fraction_non_alphanumeric': 0.10320641282565131, 'fraction_numerical': 0.0, 'mean_word_length': 3.8028846153846154, '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': '6724219', 'n_tokens_mistral': 267, 'n_tokens_neox': 259, 'n_words': 79}