'Runs the given callback with exception handling.
If the callback is a coroutine, returns its Future. On error, aborts the
websocket connection and returns None.'

def _run_callback(self, callback, *args, **kwargs):

    try:
        result = callback(*args, **kwargs)
    except Exception:
        app_log.error('Uncaught    exception    in    %s', getattr(self.request, 'path', None), exc_info=True)
        self._abort()
    else:
        if (result is not None):
            result = gen.convert_yielded(result)
            self.stream.io_loop.add_future(result, (lambda f: f.result()))
        return result
