raise exception for failed cases