<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exit_on_error(self, message, exit_code=1):
 # pylint: disable=no-self-use """Log generic message when getting an error and exit :param exit_code: if not None, exit with the provided value as exit code :type exit_code: int :param message: message for the exit reason :type message: str :return: None """

        log = "I got an unrecoverable error. I have to exit."
        if message:
            log += "\n-----\nError message: %s" % message
            print("Error message: %s" % message)
        log += "-----\n"
        log += "You can get help at https://github.com/Alignak-monitoring/alignak\n"
        log += "If you think this is a bug, create a new issue including as much " \
               "details as possible (version, configuration,...)"
        if exit_code is not None:
            exit(exit_code)