Working error handler

This commit is contained in:
AlexKvazos
2015-04-28 11:39:31 -05:00
parent 793fe3e162
commit 7e62e5dd79
5 changed files with 21 additions and 2 deletions
+3 -2
View File
@@ -14,8 +14,9 @@ module.exports = function(socket) {
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
});
socket.on('buffer:error', function(string) {
$('#buffer').append('<span style="color:#D62D18;">[i] ' + string + '</span><br>')
socket.on('buffer:error', function(error) {
if (typeof error === 'object') { error = JSON.stringify(error); }
$('#buffer').append('<span style="color:#D62D18;">[i] ' + error + '</span><br>')
$('#buffer').scrollTop($('#buffer').prop('scrollHeight'));
});