Show installation instructions for glance client on SLE12 if not installed

We will have more cases in the future. The question is what is the responsibility of the exception class and what is the responsibility of the DeployTask class. The approach you describe leaves all responsibility at the DeployTask class and the exception is just a data container. That hardly warrants creating an own class.

In the approach of putting the formatting of the error message into the exception, the responsibility of the DeployTask class is to orchestrate the logic of the deployment and the responsibility of the exception class is the display of the error message. You could think of it a little bit as controller and view.

You might be right that the knowledge about which module is needed doesn't belong in the exception class. But it neither belongs to the deployment logic. There it's just a prerequisite. The most appropriate place would be the Os class representing the platform. This should know about where the platform gets the package from. The formatting of the actual message still would belong to the exception, though.