Catch preupgrade exception

Fixes https://github.com/owncloud/apps/issues/1863
we should at least log that exception