Update shuttingtheprocess.md

Fix indentation for errorHandler() and add missing closing bracket.
This commit is contained in:
Alejandro Corredor
2018-03-09 11:54:26 -05:00
committed by GitHub
parent ecf1fe9b3d
commit 37667105fe

View File

@ -19,15 +19,18 @@ process.on('uncaughtException', function(error) {
// centralized error handler encapsulates error-handling related logic // centralized error handler encapsulates error-handling related logic
function errorHandler(){ function errorHandler() {
this.handleError = function (error) { this.handleError = function (error) {
return logger.logError(err).then(sendMailToAdminIfCritical).then(saveInOpsQueueIfCritical).then(determineIfOperationalError); return logger.logError(err)
} .then(sendMailToAdminIfCritical)
.then(saveInOpsQueueIfCritical)
.then(determineIfOperationalError);
}
this.isTrustedError = function (error) { this.isTrustedError = function (error) {
return error.isOperational; return error.isOperational;
}
} }
``` ```