You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
508 B
JavaScript
21 lines
508 B
JavaScript
'use strict';
|
|
|
|
const prettifyStack = require("../error/stack/prettify");
|
|
|
|
module.exports = function generateEmailPreview({environmentName, error, hostname}, stackFilter) {
|
|
return `
|
|
An unhandled ${error.name} occurred.
|
|
|
|
Environment: ${environmentName}
|
|
Hostname: ${hostname}
|
|
__________________________________________
|
|
|
|
Simplified error stacktrace:
|
|
|
|
${prettifyStack(error.stackWithout(stackFilter, true))}
|
|
__________________________________________
|
|
|
|
The full error information is attached.
|
|
`.trim();
|
|
};
|