made error handling throughout DAL more consistent