Skip to content
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

Introduce two exceptions to distinquish between resolution failures #179

Merged
merged 1 commit into from
May 23, 2023

Conversation

spyrkob
Copy link
Contributor

@spyrkob spyrkob commented May 23, 2023

Add NoStreamFoundException and ArtifactTransferException to the ChannelSession and VersionResolver API.

NoStreamFoundException should be thrown if the channels don't provide a requested artifact, while ArtifactTransferException wraps an underlying Maven transfer/resolution error.

This is required to correctly support fallback version resolution when the artifact is not found in channel.

@spyrkob
Copy link
Contributor Author

spyrkob commented May 23, 2023

@jmesnil , @jfdenise could you review this?

super(localizedMessage, cause, unresolvedArtifacts, attemptedRepositories);
}

public <E> ArtifactTransferException(String message, Set<ArtifactCoordinate> unresolvedArtifacts, Set<Repository> attemptedRepositories) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the E parameter, same for the other exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't, sorry copy/paste from base exception.

Removed it now, I don't think we need it on the UnresolvedMavenArtifactException either

@jmesnil jmesnil merged commit dd0b944 into wildfly-extras:main May 23, 2023
@spyrkob spyrkob deleted the split_exceptions branch May 23, 2023 12:28
@jmesnil jmesnil added this to the 1.0.1.Final milestone Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants