try {
return backedAnnotatedTypes.getCastValue(new TypeHolder<T>(rawType, baseType, bdaId));
} catch (RuntimeException e) {
if (e instanceof TypeNotPresentException || e instanceof ResourceLoadingException) {
BootstrapLogger.LOG.exceptionWhileLoadingClass(rawType.getName(), e);
throw new ResourceLoadingException("Exception while loading class " + rawType.getName(), e);
}
throw e;
} catch (Error e) {
if(e instanceof NoClassDefFoundError || e instanceof LinkageError) {
throw new ResourceLoadingException("Error while loading class " + rawType.getName(), e);
}
BootstrapLogger.LOG.errorWhileLoadingClass(rawType.getName(), e);
throw e;
}
}