landmark-serve
Version:
Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose
15 lines (12 loc) • 470 B
JavaScript
/**
* Wraps an error in simple HTML to be sent as a response to the browser
*
* @api public
*/
function wrapHTMLError(title, err) {
return '<html><head><meta charset=\'utf-8\'><title>Error</title>' +
'<link rel=\'stylesheet\' href=\'/landmark/styles/error.css\'>' +
'</head><body><div class=\'error\'><h1 class=\'error-title\'>' + title + '</h1>' +
'<div class="error-message">' + (err || '') + '</div></div></body></html>';
};
module.exports = wrapHTMLError;