<commit_before>#include "GloveException.h"

#include <boost/format.hpp>

namespace glove {

GloveException::GloveException(std::string message) : message(message) {
}

GloveException::GloveException(std::string message, const char* file, int line)
    : message(message), file(file), line(line) {
}

GloveException::~GloveException() {
}

const char* GloveException::what() const throw() {
    return (boost::format("%1%\n\tin %2%:%3%") % message % file % line).str().c_str();
}

} /* namespace glove */<commit_msg>Fixed weird issue with boost::format not displaying yaml converter exceptions<commit_after>#include "GloveException.h"

#include <boost/format.hpp>

namespace glove {

GloveException::GloveException(std::string message) : message(message) {
}

GloveException::GloveException(std::string message, const char* file, int line)
    : message(message), file(file), line(line) {
}

GloveException::~GloveException() {
}

const char* GloveException::what() const throw() {
    // The following line is - for some weird reason I can't explain - required because yaml-cpp converter exception
    // messages won't render without it.
    (boost::format("%1%\n\tin %2%:%3%") % message % file % line);
    return (boost::format("%1%\n\tin %2%:%3%") % message % file % line).str().c_str();
}

} /* namespace glove */
{'fraction_non_alphanumeric': 0.1646433990895296, 'fraction_numerical': 0.006828528072837633, 'mean_word_length': 5.251184834123222, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5752672', 'n_tokens_mistral': 423, 'n_tokens_neox': 407, 'n_words': 101}