message: Fix logging statements in rpc exception handling
diff: @@ -153,21 +153,18 @@ class Server(object):
  'type': self.call_and_serialize(lambda: type(self.root))
  })
  log.debug('Root info sent to {0}'.format(client_id))
  - except Exception as e:
  - log.error('While sending root info to {0}: '.format(client_id), e)
  + except Exception:
  + log.exception('While sending root info to {0}'.format(client_id))
  try:
  self.clients[client] = self.send_worker(client)
  # Async receive client data until websocket is closed
  async for msg in client:
  - # log.debug('Received: {0}'.format(msg))
  task = self.loop.create_task(self.process(msg))
  task.add_done_callback(task_done)
  self.tasks += [task]
  - except Exception as e:
  - log.error(
  - 'While reading from socket: {0}'
  - .format(traceback.format_exc()), e)
  + except Exception:
  + log.exception('While reading from socket:')
  finally:
  log.info('Closing WebSocket {0}'.format(id(client)))
  await client.close()
  @@ -209,12 +206,12 @@ class Server(object):
  """
  def resolve(a):
  if isinstance(a, dict):
  - id = a.get('i', None)
  + _id = a.get('i', None)
  # If it's a compound type (including dict)
  # Check if it has id (i) to determine that it has
  # a reference in object storage. If it's None, then it's
  # a dict originated at the remote
  - return self.objects[id] if id else a['v']
  + return self.objects[_id] if _id else a['v']
  # if array, resolve it's elements
  if isinstance(a, (list, tuple)):
  return [resolve(i) for i in a]
  @@ -250,8 +247,8 @@ class Server(object):
  message))
  else:
  log.warning('Unhanled WSMsgType: {0}'.format(message.type))
  - except Exception as e:
  - log.error('While processing request: {0}'.format(str(e)))
  + except Exception:
  + log.exception('Error while processing request')
  def call_and_serialize(self, func, max_depth=0):
  call_result = func()
  @@ -268,18 +265,16 @@ class Server(object):
  response['$']['status'] = 'success'
  except Exception as e:
  trace = traceback.format_exc()
  - log.warning(
  - 'Exception while dispatching a method call: {0}'
  - .format(trace))
  + log.exception('Exception while dispatching a method call:')
  try:
  line_no = [
  l.split(',')[0].strip()
  for l in trace.split('line')
  if '<module>' in l][0]
  - except Exception as exc:
  - log.debug(
  - "Exception while getting line no: {}".format(type(exc)))
  + except Exception:
  + log.exception("Exception while getting line number:")
  line_no = 'unknown'
  + finally:
  response['$']['status'] = 'error'
  call_result = '{0} [line {1}]: {2}'.format(
  e.__class__.__name__, line_no, str(e))
  