I don't recall the exceptions - we had to do this about a month ago, to
unblock a course team.  I agree the root cause should be fixed in such
cases, but also believe that in general imports should not hang up on
errors.  It would be best to be able to capture these errors and surface
them for staff and course teams.  I've added the err output to the string
so it will get captured.


On Mon, Aug 19, 2013 at 9:43 AM, chrisndodge <notifications@github.com>wrote:

> In common/lib/xmodule/xmodule/modulestore/xml_importer.py:
>
> > @@ -51,7 +51,10 @@ def import_static_content(modules, course_loc, course_data_path, static_content_
> >                      content.thumbnail_location = thumbnail_location
> >
> >                  #then commit the content
> > -                static_content_store.save(content)
> > +                try:
> > +                    static_content_store.save(content)
> > +                except Exception as err:
> > +                    log.exception('Error importing {0}'.format(fullname_with_subpath))
>
> Curious, what types of exceptions have you encountered here to warrant a
> try/catch? I'd like to understand the root cause so we can improve things
> here if they need improvement.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/652/files#r5842026>
> .
>