code: def allow_exception(self, exc_class):
          
  
          name = exc_class.__name__
          self._allowed_exceptions[name] = exc_class
docs: Allow raising this class of exceptions from commands.
  
          When a command fails on the server side due to an exception, by
          default it is turned into a string and raised on the client side as an
          ExternalError.  The original class name is sent but ignored.  If you
          would like to instead raise an instance of the same exception on the
          client side, you can pass the exception class object to this method
          and instances of that exception will be reraised.
  
          The caveat is that the exception must be creatable with a single
          string parameter and it should have a ``msg`` property.
  
          Args:
              exc_class (class): A class object with the exception that
                  we should allow to pass from server to client.