-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Improve error message for unresolved expressions #11615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: 高春晖 <18220699480@163.com>
| enhanced.append("Failed to collect dependencies"); | ||
|
|
||
| org.eclipse.aether.graph.Dependency root = request.getRoot(); | ||
| if (root != null && root.getArtifact() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (root != null && root.getArtifact() != null) { | |
| return if (root != null && root.getArtifact() != null) ? enhanceDependency() : enhanceDependencies(...); |
could be extracted as dedicated branch/concern to provide cohesion over coupling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ternary operators are harder to read
| } | ||
| } | ||
|
|
||
| for (org.eclipse.aether.graph.Dependency dep : request.getDependencies()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be extracted as dedicated branch/concern to provide cohesion over coupling.
| for (org.eclipse.aether.graph.Dependency dep : request.getDependencies()) { | |
| return enhanceDependencies(...) |
| } catch (DependencyCollectionException e) { | ||
| throw new DependencyResolverException("Unable to collect dependencies", e); | ||
| String enhancedMessage = enhanceCollectionError(e, collectRequest); | ||
| throw new DependencyResolverException(enhancedMessage, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| throw new DependencyResolverException(enhancedMessage, e); | |
| throw new DependencyResolverException(enhanceCollectionError(e, collectRequest), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine as is
| } catch (DependencyCollectionException e) { | ||
| throw new DependencyResolverException("Unable to collect dependencies", e); | ||
| String enhancedMessage = enhanceCollectionError(e, collectRequest); | ||
| throw new DependencyResolverException(enhancedMessage, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine as is
| enhanced.append("Failed to collect dependencies"); | ||
|
|
||
| org.eclipse.aether.graph.Dependency root = request.getRoot(); | ||
| if (root != null && root.getArtifact() != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ternary operators are harder to read
Fixes #10324