Attempt to catch error occuring on Xibalba

This commit is contained in:
Bryan Ashby 2016-01-02 13:20:52 -07:00
parent f292944992
commit 1fe8fe68e8
1 changed files with 28 additions and 1 deletions

View File

@ -74,6 +74,32 @@ WhosOnlineModule.prototype.mciReady = function(mciData, cb) {
var now = moment();
onlineListView.setItems(_.map(onlineList, function formatOnlineEntry(oe) {
var fmtObj = {
node : oe.node,
userId : oe.user.userId,
userName : oe.user.username,
realName : oe.user.properties.real_name,
timeOn : function getTimeOn() {
var diff = now.diff(moment(oe.user.properties.last_login_timestamp), 'minutes');
return _.capitalize(moment.duration(diff, 'minutes').humanize());
},
action : function getCurrentAction() {
var cmm = oe.currentMenuModule;
if(cmm) {
return cmm.menuConfig.desc || 'Unknown';
}
return 'Unknown';
//oe.currentMenuModule.menuConfig.desc || 'Unknown',
},
location : oe.user.properties.location,
affils : oe.user.properties.affiliation,
};
try {
return listFormat.format(fmtObj);
} catch(e) {
console.log('Exception caught formatting: ' + e.toString() + ':\n' + JSON.stringify(fmtObj));
}
/*
return listFormat.format({
node : oe.node,
userId : oe.user.userId,
@ -94,6 +120,7 @@ WhosOnlineModule.prototype.mciReady = function(mciData, cb) {
location : oe.user.properties.location,
affils : oe.user.properties.affiliation,
});
*/
}));
// :TODO: This is a hack until pipe codes are better implemented