Is it possible to make a plugin that we can use for example news or error or what ever we want.

Like if I have an error on the site like I would like to make a popup at the top displaying "Right now we have problem XXXXX, we are working on it"