lkishalmi commented on code in PR #5270:
URL: https://github.com/apache/netbeans/pull/5270#discussion_r1066608548
##########
extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java:
##########
@@ -380,8 +380,10 @@ private static String getLocation(Throwable
locationAwareEx) {
return (String)locationAccessor.invoke(locationAwareEx);
} catch (ReflectiveOperationException ex) {
LOG.log(Level.FINE,"Error getting location", ex);
- return null;
+ } catch (IllegalArgumentException iae) {
+ LOG.log(Level.FINE,"Trying to get location from an exception, that
has no location property: " + locationAwareEx.getClass().getName());
}
+ return null;
Review Comment:
Well, I think it's a tradeoff we need to pay when we try to cover multiple
versions at once. My mind could trick me, but some exceptions had `getLocation`
methods even before `LocationAwareException` was introduced.
This is just some heuristic, trying to figure out what's behind a Gradle
build failure. If we can get a location out of that we display it as an editor
hint on the source code.
Well, if the heuristic does not work we just shall let it go...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists