Catches error on database access.

Refs #104