connectorConfig.setReadTimeout(orig_readTimeout);
}
}
private ExecuteAnonymousResult errorExecuteAnonymousResult(ConnectorConfig apexCfg, Exception exception) {
ExecuteAnonymousResult er = new ExecuteAnonymousResult();
er.setCompiled(true);
er.setSuccess(false);
String msg = ForceExceptionUtils.getConnectionCauseExceptionMessage(apexCfg, exception);
er.setExceptionMessage(msg);
if (Utils.isNotEmpty(exception.getStackTrace())) {
StackTraceElement[] stackTraces = exception.getStackTrace();
StringBuffer trace = new StringBuffer();
for (StackTraceElement element : stackTraces) {
trace.append(element.getClassName()).append(".").append(element.getMethodName()).append(" line ")
.append(element.getLineNumber()).append("\n");
}
er.setExceptionStackTrace(trace.toString());
}
return er;
}