<commit_before>#include <iomanip>
#include <sstream>
#include <string>
#include <string_view>
#include <tmxpp/impl/exceptions.hpp>

namespace tmxpp::impl {

namespace {

std::string quoted(std::string_view s)
{
    std::stringstream ss;
    ss << std::quoted(std::string{s});
    return ss.str();
}

} // namespace

explicit Invalid_attribute::Invalid_attribute(Name name)
  : tmxpp::Invalid_attribute{"Invalid attribute " + quoted(get(name))};
{
}

explicit Invalid_attribute::Invalid_attribute(Name name, Value value)
  : tmxpp::Invalid_attribute{"Invalid attribute value " + quoted(get(name)) +
                             '=' + quoted(get(value))};
{
}

explicit Invalid_element::Invalid_element(Name name)
  : tmxpp::Invalid_element{"Invalid element " + std::string{get(name)}};
{
}

explicit Invalid_element::Invalid_element(Name name, Value value)
  : tmxpp::Invalid_element{"Invalid element value <" + std::string{get(name)} +
                           ">\n" + std::string{get(value)} +
                           "\n<" std::string{get(name)} + '>'};
{
}

} // namespace tmxpp::impl<commit_msg>Fix src/exceptions.cpp<commit_after>#include <iomanip>
#include <sstream>
#include <string>
#include <string_view>
#include <tmxpp/impl/exceptions.hpp>

namespace tmxpp::impl {

namespace {

std::string quoted(std::string_view s)
{
    std::stringstream ss;
    ss << std::quoted(std::string{s});
    return ss.str();
}

} // namespace

Invalid_attribute::Invalid_attribute(Name name)
  : tmxpp::Invalid_attribute{"Invalid attribute " + quoted(get(name))}
{
}

Invalid_attribute::Invalid_attribute(Name name, Value value)
  : tmxpp::Invalid_attribute{"Invalid attribute value " + quoted(get(name)) +
                             '=' + quoted(get(value))}
{
}

Invalid_element::Invalid_element(Name name)
  : tmxpp::Invalid_element{"Invalid element " + std::string{get(name)}}
{
}

Invalid_element::Invalid_element(Name name, Value value)
  : tmxpp::Invalid_element{"Invalid element value <" + std::string{get(name)} +
                           ">\n" + std::string{get(value)} + "\n<" +
                           std::string{get(name)} + '>'}
{
}

} // namespace tmxpp::impl
{'fraction_non_alphanumeric': 0.16291877007801744, 'fraction_numerical': 0.0, 'mean_word_length': 3.988558352402746, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3904184', 'n_tokens_mistral': 705, 'n_tokens_neox': 704, 'n_words': 116}