Throw exception if resource not found.