try {
res = request(req);
} catch (Exception e) {
if (e instanceof RemoteException && e.getCause() instanceof ConnectException) {
e = (Exception) e.getCause();
throw (ServiceUnavailableException) new ServiceUnavailableException("Cannot lookup '" + name + "'.").initCause(e);
}
throw (NamingException) new NamingException("Cannot lookup '" + name + "'.").initCause(e);
}
switch (res.getResponseCode()) {