<commit_before>#!/usr/bin/env python
# encoding: utf-8

"""Class to handle Exceptions relating to MoodleFUSE actions
"""

from functools import wraps

from moodlefuse.core import config


class MoodleFuseException(Exception):
    def __init__(self, debug_info):
        exception_reason = "ERROR ENCOUNTERED: MoodleFUSE has encountered an error."
        debug_info = debug_info
        self.message = exception_reason + debug_info

    def __str__(self):
        return self.message


def throws_moodlefuse_error(moodlefuse_error):
    def inner(f):
        def wrapped(*args):
            try:<commit_msg>Change error message to local constant<commit_after>#!/usr/bin/env python
# encoding: utf-8

"""Class to handle Exceptions relating to MoodleFUSE actions
"""

from functools import wraps

from moodlefuse.core import config


class MoodleFuseException(Exception):
    def __init__(self, debug_info):
        _EXCEPTION_REASON = "ERROR ENCOUNTERED: MoodleFUSE has encountered an error."
        self.message = _EXCEPTION_REASON + debug_info

    def __str__(self):
        return self.message


def throws_moodlefuse_error(moodlefuse_error):
    def inner(f):
        def wrapped(*args):
            try:
{'fraction_non_alphanumeric': 0.08023159636062861, 'fraction_numerical': 0.0016542597187758478, 'mean_word_length': 3.6007604562737643, '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': '1323459', 'n_tokens_mistral': 383, 'n_tokens_neox': 364, 'n_words': 100}