log.error("Could not log in anonymous user");
}
}
Response response = null;
EventDataBuilder builder = null;
// Maybe record analytics events
if (eventRecorder != null && eventRecorder.isEnabled()) {
builder = new EventDataBuilder("Ext.Direct")
.set("type", method.getType().name())
.set("name", method.getName())
.set("action", method.getActionName());
}
MDC.put(getClass().getName(), method.getFullName());
try {
response = asResponse(super.invokeMethod(method, actionInstance, parameters));
}
catch (InvocationTargetException e) {
response = handleException(method, e.getTargetException());
}
catch (Throwable e) {
response = handleException(method, e);
}
finally {
// Record analytics event
if (builder != null) {
if (response != null) {
builder.set("success", response.isSuccess());
}
eventRecorder.record(builder.build());
}
MDC.remove(getClass().getName());
}