<commit_before>/*jslint node: true, nomen: true, white: true, unparam: true*/
/*!
 * Sitegear3
 * Copyright(c) 2014 <NAME>, Sitegear.org
 * MIT Licensed
 */

(function (_) {
	"use strict";

	module.exports = function () {
		return function (error, request, response, next) {
			console.log('Internal Server Error: ', error);
			response.status(error.status || 500);
			if (request.accepts('html')) {
				response.render('_errors/500', { status: 'Internal Server Error', error: error });
			} else if (request.accepts('json')) {
				response.send({ status: 'Internal Server Error', error: error });
			} else {
				response.type('txt').send('Internal Server Error: ' + error);
			}
		};
	};
}(require('lodash')));<commit_msg>Log stack trace for errors.<commit_after>/*jslint node: true, nomen: true, white: true, unparam: true*/
/*!
 * Sitegear3
 * Copyright(c) 2014 <NAME>, Sitegear.org
 * MIT Licensed
 */

(function (_) {
	"use strict";

	module.exports = function () {
		return function (error, request, response, next) {
			console.log('Internal Server Error: ', error);
			console.log(error.stack);
			response.status(error.status || 500);
			if (request.accepts('html')) {
				response.render('_errors/500', { status: 'Internal Server Error', error: error });
			} else if (request.accepts('json')) {
				response.send({ status: 'Internal Server Error', error: error });
			} else {
				response.type('txt').send('Internal Server Error: ' + error);
			}
		};
	};
}(require('lodash')));
{'fraction_non_alphanumeric': 0.18242790073775988, 'fraction_numerical': 0.014755197853789403, 'mean_word_length': 4.04054054054054, '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': '5982093', 'n_tokens_mistral': 537, 'n_tokens_neox': 466, 'n_words': 120}