<commit_before>#pragma once

#include <string>

#define GENERR  (0x1 << 7)
#define SKINERR (GENERR << 8)

#define SKINERR_INVALID_SKIN       SKINERR + 1
#define SKINERR_INVALID_OSD        SKINERR + 2
#define SKINERR_INVALID_METER      SKINERR + 3
#define SKINERR_INVALID_CONT       SKINERR + 4
#define SKINERR_INVALID_OSD_BG     SKINERR + 5
#define SKINERR_INVALID_CONT_BG    SKINERR + 6
#define SKINERR_INVALID_SLIDERTYPE SKINERR + 7
#define SKINERR_NOTFOUND           SKINERR + 8

class Error {
public:
    static void ErrorMessage(unsigned int error, std::wstring detail = L"") {
        std::wstring msg(L"");

        msg = msg + L"Unknown error occurred: " + std::to_wstring(error);
        if (detail != L"") {
            msg = msg + L"\n" + detail;
        }

        MessageBox(NULL, msg.c_str(), Error::ErrorType(error), MB_ICONERROR);
    }

    static void ErrorMessageDie(unsigned int error, std::wstring detail = L"") {
        ErrorMessage(error);
        exit(EXIT_FAILURE);
    }

private:
    static wchar_t *ErrorType(unsigned int error) {
        if ((error & GENERR) == GENERR) {
            return L"3RVX Error";
        } else if ((error & SKINERR) == SKINERR) {
            return L"Skin Error";
        }

        return L"Error";
    }
};<commit_msg>Fix detail message bug<commit_after>#pragma once

#include <string>

#define GENERR  (0x1 << 7)
#define SKINERR (GENERR << 8)

#define SKINERR_INVALID_SKIN       SKINERR + 1
#define SKINERR_INVALID_OSD        SKINERR + 2
#define SKINERR_INVALID_METER      SKINERR + 3
#define SKINERR_INVALID_CONT       SKINERR + 4
#define SKINERR_INVALID_OSD_BG     SKINERR + 5
#define SKINERR_INVALID_CONT_BG    SKINERR + 6
#define SKINERR_INVALID_SLIDERTYPE SKINERR + 7
#define SKINERR_NOTFOUND           SKINERR + 8

class Error {
public:
    static void ErrorMessage(unsigned int error, std::wstring detail = L"") {
        std::wstring msg(L"");

        msg = msg + L"Unknown error occurred: " + std::to_wstring(error);
        if (detail != L"") {
            msg = msg + L"\n" + detail;
        }

        MessageBox(NULL, msg.c_str(), Error::ErrorType(error), MB_ICONERROR);
    }

    static void ErrorMessageDie(unsigned int error, std::wstring detail = L"") {
        ErrorMessage(error, detail);
        exit(EXIT_FAILURE);
    }

private:
    static wchar_t *ErrorType(unsigned int error) {
        if ((error & GENERR) == GENERR) {
            return L"3RVX Error";
        } else if ((error & SKINERR) == SKINERR) {
            return L"Skin Error";
        }

        return L"Error";
    }
};
{'fraction_non_alphanumeric': 0.11085180863477247, 'fraction_numerical': 0.010112796577207312, 'mean_word_length': 2.7007194244604316, 'pattern_counts': {'":': 0, '<': 13, '<?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': '7265292', 'n_tokens_mistral': 888, 'n_tokens_neox': 861, 'n_words': 218}