Catch exception on data persistence and throw custom exception on error. Fixes #220.

This allows to fail gracefully. Fixes #220 only on Precapture form.