Fixed exception handling in AbstractDAO.