try {
stateLock.writeLock().lock();
failure = checkNotNull(e);
failingAction = checkNotNull(action);
log.error("Could not {} capability {} ({})", action.toLowerCase(), capability, id, e);
eventBus.post(new CallbackFailure(capabilityRegistry, this, action, e));
}
finally {
stateLock.writeLock().unlock();
}
}