}
Throwable errorThrowable = null;
String error = null;
Pair<Message, CellScanner> resultPair = null;
CurCall.set(call);
TraceScope traceScope = null;
try {
if (!started) {
throw new ServerNotRunningYetException("Server is not running yet");
}
if (call.tinfo != null) {
traceScope = Trace.startSpan(call.toTraceString(), call.tinfo);
}
// make the call
RequestContext.set(userProvider.create(call.connection.user), getRemoteIp(),
call.connection.service);
// make the call
resultPair = call(call.service, call.md, call.param, call.cellScanner, call.timestamp,
status);
} catch (Throwable e) {
LOG.debug(getName() + ": " + call.toShortString(), e);
errorThrowable = e;
error = StringUtils.stringifyException(e);
} finally {
if (traceScope != null) {
traceScope.close();
}
// Must always clear the request context to avoid leaking
// credentials between requests.
RequestContext.clear();
}