}
request = request.trim();
if (request.length() == 0) {
break;
}
ReplResponse response = ScriptRepl.getInstance().eval(session, request);
if (response instanceof ReplResponse.Response) {
ReplResponse.Response shellResponse = (ReplResponse.Response)response;
Exception ex = new Exception("Was not expecting response " + shellResponse.response);
throw new CommandException(ErrorKind.EVALUATION, "Failure when evaluating '" + request + "' in script " + name, ex);
} else if (response instanceof ReplResponse.Invoke) {