<commit_before>import * as sourceMapSupport from 'source-map-support';
import '../config';
import logger from '../logger';

sourceMapSupport.install();

process.on('unhandledRejection', (reason: any, promise: Promise<any>): void => {
    logger.error('UNHANDLED REJECTION', reason, promise);
    process.exit(1);
});<commit_msg>feat(bootstrap): also catch process' 'uncaughtException' event for logging<commit_after>import * as sourceMapSupport from 'source-map-support';
import '../config';
import logger from '../logger';

sourceMapSupport.install();

process.on('unhandledRejection', (reason: any): void => {
    logger.error('UNHANDLED REJECTION', reason);
    process.exit(1);
});

process.on('uncaughtException', (err: any): void => {
    logger.error('UNCAUGHT EXCEPTION', err);
    process.exit(1);
});
{'fraction_non_alphanumeric': 0.17160493827160495, 'fraction_numerical': 0.003703703703703704, 'mean_word_length': 5.540322580645161, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, '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': '1643738', 'n_tokens_mistral': 245, 'n_tokens_neox': 242, 'n_words': 58}