Socket.js error message

I've added an error message to be posted to the javascript console anytime the socket service has an error. This should help in debugging issues down the line.
This commit is contained in:
Jared Tabor 2015-01-06 10:21:48 -05:00
parent a53071ff07
commit 7d63f1dbf0

View File

@ -115,6 +115,7 @@ angular.module('SocketIO', ['AuthService', 'Utilities'])
self.socket.on('error', function(reason) {
var r = reason || 'connection refused by host';
$log.debug('Socket error: ' + r);
$log.error('Socket error: ' + r);
self.scope.$apply(function() {
self.scope.socketStatus = 'error';
self.scope.socketTip = getSocketTip(self.scope.socketStatus);