catch exceptions in model db calls