use of org.gradle.internal.exceptions.LocationAwareException in project gradle by gradle.
the class DefaultPluginRequestApplicator method resolveToFoundResult.
private Result resolveToFoundResult(PluginResolver effectivePluginResolver, PluginRequestInternal request) {
Result result = new Result(request);
try {
effectivePluginResolver.resolve(request, result);
} catch (Exception e) {
throw new LocationAwareException(new GradleException(String.format("Error resolving plugin %s", request.getDisplayName()), e), request.getScriptDisplayName(), request.getLineNumber());
}
if (!result.isFound()) {
String message = buildNotFoundMessage(request, result);
Exception exception = new UnknownPluginException(message);
throw new LocationAwareException(exception, request.getScriptDisplayName(), request.getLineNumber());
}
return result;
}
Aggregations