<commit_before>function process_uglify_js(process, global){

    global.__res = null// catch request to inform UI, see note in 'uncaughtException'

    process.on('uncaughtException', function(err){
        log('Caught exception: ' + err.stack)
        if(__res){
        // NOTE: with many users and high load this may send errors to
        //       the wrong end; thus this is mostly a development tool
            __res.json({success:false, data: err.stack})
            __res = null
        }
    })

    process.on('exit', function process_exit(){
        log('$ backend process exit event')
    })

}

module.exports = process_uglify_js<commit_msg>catch errors, fix: dee999e5b8cf94fe37781087d0f33242864f4498<commit_after>function process_uglify_js(process, global){

    global.__res = null// catch request to inform UI, see note in 'uncaughtException'

    process.on('uncaughtException', function(err){
    try{
        log('Caught exception: ' + err.stack)
        if(__res){
    // NOTE: with many users and high load this may send errors to
    //       the wrong end; thus this is mostly a development tool
            __res.json({success:false, data: err.stack})
            __res = null
        }
    }catch(ex){ }
    })

    process.on('exit', function process_exit(){
        log('$ backend process exit event')
    })

}

module.exports = process_uglify_js
{'fraction_non_alphanumeric': 0.10618181818181818, 'fraction_numerical': 0.020363636363636365, 'mean_word_length': 2.689008042895442, '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': '5250393', 'n_tokens_mistral': 418, 'n_tokens_neox': 398, 'n_words': 118}