<commit_before>/*
 * exception.js: Utility methods for gathing information about uncaughtExceptions.
 *
 * (C) 2010 <NAME>
 * MIT LICENCE
 *
 */
 
var os = require('os'),
    stackTrace = require('stack-trace');
    
var exception = exports;

exception.getAllInfo = function (err) {
  return {
    process: exception.getProcessInfo(),
    os:      exception.getOsInfo(),
    trace:   exception.getTrace(err),
    stack:   err.stack.split('\n')
  };
};

exception.getProcessInfo = function () {
  return {
    pid:         process.pid,
    uid:         process.getuid(),
    gid:         process.getgid(),
    cwd:         process.cwd(),
    execPath:    process.execPath,
    version:     process.version,
    argv:        process.argv,
    memoryUsage: process.memoryUsage()
  };
};<commit_msg>Fixing uncaught exception handler on Windows.<commit_after>/*
 * exception.js: Utility methods for gathing information about uncaughtExceptions.
 *
 * (C) 2010 <NAME>
 * MIT LICENCE
 *
 */
 
var os = require('os'),
    stackTrace = require('stack-trace');
    
var exception = exports;

exception.getAllInfo = function (err) {
  return {
    process: exception.getProcessInfo(),
    os:      exception.getOsInfo(),
    trace:   exception.getTrace(err),
    stack:   err.stack.split('\n')
  };
};

exception.getProcessInfo = function () {
  return {
    pid:         process.pid,
    uid:         process.getuid ? process.getuid() : null,
    gid:         process.getgid ? process.getgid() : null,
    cwd:         process.cwd(),
    execPath:    process.execPath,
    version:     process.version,
    argv:        process.argv,
    memoryUsage: process.memoryUsage()
  };
};
{'fraction_non_alphanumeric': 0.13353293413173653, 'fraction_numerical': 0.004790419161676647, 'mean_word_length': 2.609071274298056, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1040223', 'n_tokens_mistral': 529, 'n_tokens_neox': 511, 'n_words': 115}