'Load a course, keeping track of errors as we go along. If course_ids is not None,
then reject the course unless its id is in course_ids.'

def try_load_course(self, course_dir, course_ids=None, target_course_id=None):

    errorlog = make_error_tracker()
    course_descriptor = None
    try:
        course_descriptor = self.load_course(course_dir, course_ids, errorlog.tracker, target_course_id)
    except Exception as exc:
        msg = "ERROR:    Failed    to    load    courselike    '{0}':    {1}".format(course_dir.encode('utf-8'), unicode(exc))
        log.exception(msg)
        errorlog.tracker(msg)
        self.errored_courses[course_dir] = errorlog
    if (course_descriptor is None):
        pass
    elif isinstance(course_descriptor, ErrorDescriptor):
        self.errored_courses[course_dir] = errorlog
    else:
        self.courses[course_dir] = course_descriptor
        course_descriptor.parent = None
        course_id = self.id_from_descriptor(course_descriptor)
        self._course_errors[course_id] = errorlog
