

class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):
    pass



class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):

    def __str__(self):
        if len(self.args) > 0:
            return "Failed to authenticate with host '{}'.".format(self.args[0])
        else:
            return "Failed to authenticate with host."

Improve error message for authentication issues.
Improve error message for authentication issues.

  
  
  class Error(Exception):
      pass
  
  
  class ConfigError(Error, RuntimeError):
      pass
  
  
  class AuthenticationError(Error, RuntimeError):
-     pass
  
+     def __str__(self):
+         if len(self.args) > 0:
+             return "Failed to authenticate with host '{}'.".format(self.args[0])
+         else:
+             return "Failed to authenticate with host."
+ 
Improve error message for authentication issues.
## Code Before:


class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):
    pass

## Instruction:
Improve error message for authentication issues.
## Code After:


class Error(Exception):
    pass


class ConfigError(Error, RuntimeError):
    pass


class AuthenticationError(Error, RuntimeError):

    def __str__(self):
        if len(self.args) > 0:
            return "Failed to authenticate with host '{}'.".format(self.args[0])
        else:
            return "Failed to authenticate with host."
