Unexpected conditions is something, which is unavoidable in any application. So is Hybris store front. There may be hundreds of situations, where you would like to show an error message to users. The error could be because of, wrong user input, unavailability of data, inadequate exception handling or some thing else. But the bottom line is, it is unavoidable.
Hybris provides a very flexible and modular approach to show error messages. But your customer may still want to customize the way we show error messages in store front.
While serving a particular request in your java classes (controllers, facades, service, dao etc), whenever you come across a error situation (like validation error or a possible null pointer etc), you should use this class. This class provides static methods to add error messages to your model object.
There are different type of messages, you can add to your model. They include confirmation message, error or warning messages.
This tag is used to actually render the error message at a particular position and some css. Now you can customize the csss as you want.
The error messages, are present in base properties. If you want to add a new type of error message to your store front, you should do that in Global message class.