code: def _update_exit_code_from_error(self, error):
          '''Set the exit code based on the error type.
  
          Args:
              error (:class:`Exception`): An exception instance.
          '''
          for error_type, exit_code in self.ERROR_CODE_MAP.items():
              if isinstance(error, error_type):
                  self.update_exit_code(exit_code)
                  break
          else:
              self.update_exit_code(ExitStatus.generic_errorf _update_exit_code_from_error(self, error):
          '''Set the exit code based on the error type.
  
          Args:
              error (:class:`Exception`): An exception instance.
          '''
          for error_type, exit_code in self.ERROR_CODE_MAP.items():
              if isinstance(error, error_type):
                  self.update_exit_code(exit_code)
                  break
          else:
              self.update_exit_code(ExitStatus.generic_error)
docs: Set the exit code based on the error type.
  
          Args:
              error (:class:`Exception`): An exception instance.