[JENKINS-25403] Fixed the error message for no $class or stapler-class.