if(th instanceof org.jboss.fresh.events.net.TakenOverException) {
log.debug("CATCH TakenOverException ");
throw (TakenOverException) th;
}
} else if(th instanceof NoSuchProcessException) {
throw new TakenOverException(th.getMessage());
} else if(th instanceof ThrowableProxy) {
log.debug("CATCH ThrowableProxy ");
String cname = ((ThrowableProxy) th).getClassName();
if("org.jboss.fresh.io.ApplicationIOException".equals(cname)) {
log.debug("CATCH LC ApplicationIOException ");
th = th.getCause();
if(th instanceof ThrowableProxy) {
log.debug("CATCH ThrowableProxy ");
cname = ((ThrowableProxy) th).getClassName();
if("org.jboss.fresh.events.net.TakenOverException".equals(cname)) {
log.debug("CATCH LC TakenOverException ");
throw new TakenOverException(th.getMessage());
} else if("org.jboss.fresh.shell.UninitializedEnvironmentException".equals(cname)) {
throw new ConnectorException(new org.jboss.fresh.shell.UninitializedEnvironmentException(th.getMessage()));
}
}
}
}
log.debug("THROW ConnectorException ");
throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ") read buffer: " + ls, ex);
} catch(IOException ex) {
Throwable th = ex.getCause();
if(th instanceof NoSuchProcessException)
throw new TakenOverException(th.getMessage());
else
throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ") read buffer: " + ls, ex);
} catch(Exception ex) {
//log.error("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ") read buffer: " + ls, ex);
throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ") ", ex);