Commit c58fc682 authored by Farid Neshat's avatar Farid Neshat

Log error messages

parent f8134517
......@@ -16,4 +16,9 @@ exports.formatTimeOff = ({type, start, end, amount, unit, amountUnit, id}) => {
exports.formatDate = (date, withYear, format = HUMAN_DATE_FORMAT) =>
moment(date).format(format + (withYear ? ' YYYY' : ''));
exports.errorHandler = msg => err => msg.reply('I\'m sorry, something went wrong: ' + err.message || err);
exports.errorHandler = msg => err => {
msg.reply('I\'m sorry, something went wrong: ' + err.message || err);
console.error(err);
console.error(err.stack);
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment