function safeGetWaypoints(connection) {

  var waypoints = connection.waypoints;

  if (!waypoints.length) {
    throw new Error('connection#' + connection.id + ': no waypoints');
  }

  return waypoints;
}
Return waypoints of given connection; throw if non exists (should not happen!!).

@param {Connection} connection

@return {Point[]}