<commit_before>import sys
import os

from . import options
from . import builtin_functions
from . import loading
from . import utilities

def main():
    try:
        processed_options = options.process_options()
        filename = processed_options.script
        if filename != '-':
            filename = loading.try_select_path(os.curdir, os.curdir, filename)

        loading.try_load_file(filename, {
            **builtin_functions.BUILTIN_FUNCTIONS,
            **options.make_args_function(processed_options),
        }, processed_options.target, utilities.get_base_path(filename))
    except Exception as exception:
        sys.exit('error: {}'.format(exception))<commit_msg>Issue #57: correct a general error processing<commit_after>import sys
import os

from . import options
from . import builtin_functions
from . import loading
from . import utilities
from . import error

def main():
    try:
        processed_options = options.process_options()
        filename = processed_options.script
        if filename != '-':
            filename = loading.try_select_path(os.curdir, os.curdir, filename)

        loading.try_load_file(filename, {
            **builtin_functions.BUILTIN_FUNCTIONS,
            **options.make_args_function(processed_options),
        }, processed_options.target, utilities.get_base_path(filename))
    except error.Error as exception:
        sys.exit(exception)
    except Exception as exception:
        sys.exit('error: {}'.format(exception))
{'fraction_non_alphanumeric': 0.09280430396772024, 'fraction_numerical': 0.0013449899125756557, 'mean_word_length': 3.191549295774648, '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': '174165', 'n_tokens_mistral': 403, 'n_tokens_neox': 394, 'n_words': 93}