<commit_before>#ifndef CETECH_ERRORS_H
#define CETECH_ERRORS_H

//==============================================================================
// Includes
//==============================================================================

#include <stdlib.h>

#include "cetech/log.h"

//==============================================================================
// Iterface
//==============================================================================

#ifdef CETECH_DEBUG
#define _MSG_END "\n  file: %s\n  line: %d\n  stacktrace:\n%s"
#define CETECH_ASSERT_MSG(where, condition, msg, ...)                             \
    do {                                                                       \
        if (!(condition)) {                                                    \
            char* st = stacktrace(1);                                      \
            log_error(where ".assert",                                         \
                       "msg: \"%s, " msg "\"" _MSG_END,                        \
                       #condition,                                             \
                       ## __VA_ARGS__,                                         \
                       __FILE__,                                               \
                       __LINE__,                                               \<commit_msg>ENGINE-202 - refactor old celib api - assert yaml - split file and line<commit_after>
#ifndef CETECH_ERRORS_H
#define CETECH_ERRORS_H

//==============================================================================
// Includes
//==============================================================================

#include <stdlib.h>

#include "cetech/log.h"

//==============================================================================
// Iterface
//==============================================================================

#ifdef CETECH_DEBUG
#define _MSG_END "\n  file: %s:%d\n  stacktrace:\n%s"
#define CETECH_ASSERT_MSG(where, condition, msg, ...)                             \
    do {                                                                       \
        if (!(condition)) {                                                    \
            char* st = stacktrace(1);                                      \
            log_error(where ".assert",                                         \
                       "msg: \"%s, " msg "\"" _MSG_END,                        \
                       #condition,                                             \
                       ## __VA_ARGS__,                                         \
                       __FILE__,                                               \
                       __LINE__,                                               \
{'fraction_non_alphanumeric': 0.29430835734870314, 'fraction_numerical': 0.0018011527377521613, 'mean_word_length': 1.016702977487291, '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': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3804987', 'n_tokens_mistral': 523, 'n_tokens_neox': 467, 'n_words': 89}