This looks buggy. Especially in a large set of sync's and migrations, the printed error message is very likely to be ignored. Is there a reason not to re-raise and stop the migration?