String status = hasAccess(referencingDescriptor, def, accessCheckCache);
if (status != null) {
DefDescriptor<? extends Definition> descriptor = def.getDescriptor();
String message = Aura.getConfigAdapter().isProduction() ? DefinitionNotFoundException.getMessage(
descriptor.getDefType(), descriptor.getName()) : status;
throw new NoAccessException(message);
}
}