emit to socket on general error