Keep a global error log, every time something goes wrong, add it to the log. Whenever you load a page, echo the log to the navbar, and then clear it.