def exception(self, current): if current.operation == "ice_ids": raise Test.TestIntfUserException() elif current.operation == "requestFailedException": raise Ice.ObjectNotExistException() elif current.operation == "unknownUserException": raise Ice.UnknownUserException("reason") elif current.operation == "unknownLocalException": raise Ice.UnknownLocalException("reason") elif current.operation == "unknownException": raise Ice.UnknownException("reason") elif current.operation == "userException": raise Test.TestIntfUserException() elif current.operation == "localException": raise Ice.SocketException(0) elif current.operation == "pythonException": raise RuntimeError("message") elif current.operation == "unknownExceptionWithServantException": raise Ice.UnknownException("reason") elif current.operation == "impossibleException": raise Test.TestIntfUserException( ) # Yes, it really is meant to be TestIntfUserException. elif current.operation == "intfUserException": raise Test.TestImpossibleException( ) # Yes, it really is meant to be TestImpossibleException. elif current.operation == "asyncResponse": raise Test.TestImpossibleException() elif current.operation == "asyncException": raise Test.TestImpossibleException()