ankidroid/Anki-Android — pull request #549 by timrae (2014-10-19 01:53:20+00:00)
Title: Catch all sync errors

This PR fixes [issue 2324](https://code.google.com/p/ankidroid/issues/detail?id=2324) and makes sure that we catch all sync errors. It also adds a `finally` block at the end of the sync which closes the collection, [as per Anki Desktop](https://github.com/dae/anki/blob/08e5caef8732c415d23bbaf29a35c80e3e1bd8a2/aqt/sync.py#L324), which should ensure that the Collection is rolled back to its previous state properly when an error occurs.