code: def exit_on_error(self):
          
          if self.exit_code:
              if self.errmsg is not None:
                  logger.show("Exiting due to " + self.errmsg + ".")
                  self.errmsg = None
              if self.using_jobs:
                  kill_children()
              sys.exit(self.exit_code)
docs: Exit if exit_code is abnormal.