/** * Creates a new exception with the specified metadata, repository and cause. * * @param metadata The untransferable metadata, may be {@code null}. * @param repository The involved remote repository, may be {@code null}. * @param cause The exception that caused this one, may be {@code null}. */ public MetadataTransferException( Metadata metadata, RemoteRepository repository, Throwable cause ) { this( metadata, repository, "Could not transfer metadata " + metadata + getString( " from/to ", repository ) + getMessage( ": ", cause ), cause ); }
private MetadataTransferException newException(String error, Metadata metadata, RemoteRepository repository) { if (error == null || error.length() <= 0) { return new MetadataNotFoundException(metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced"); } else { return new MetadataTransferException(metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error); } }
throw new DeploymentException( "Failed to deploy metadata: " + upload.getException().getMessage(), upload.getException() );
private MetadataTransferException newException(String error, Metadata metadata, RemoteRepository repository) { if (error == null || error.length() <= 0) { return new MetadataNotFoundException(metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced"); } else { return new MetadataTransferException(metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error); } }
throw new DeploymentException( "Failed to deploy metadata: " + upload.getException().getMessage(), upload.getException() );
private MetadataTransferException newException( String error, Metadata metadata, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new MetadataNotFoundException( metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced", true ); } else { return new MetadataTransferException( metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error, true ); } }
/** * Creates a new exception with the specified metadata, repository and cause. * * @param metadata The untransferable metadata, may be {@code null}. * @param repository The involved remote repository, may be {@code null}. * @param cause The exception that caused this one, may be {@code null}. */ public MetadataTransferException( Metadata metadata, RemoteRepository repository, Throwable cause ) { this( metadata, repository, "Could not transfer metadata " + metadata + getString( " from/to ", repository ) + getMessage( ": ", cause ), cause ); }
private MetadataTransferException newException( String error, Metadata metadata, RemoteRepository repository ) { if ( error == null || error.length() <= 0 ) { return new MetadataNotFoundException( metadata, repository, "Failure to find " + metadata + " in " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced", true ); } else { return new MetadataTransferException( metadata, repository, "Failure to transfer " + metadata + " from " + repository.getUrl() + " was cached in the local repository, " + "resolution will not be reattempted until the update interval of " + repository.getId() + " has elapsed or updates are forced. Original error: " + error, true ); } }
public Exception wrap( MetadataTransfer transfer, Exception e, RemoteRepository repository ) { MetadataTransferException ex = null; e = WagonCancelledException.unwrap( e ); if ( e instanceof ResourceDoesNotExistException ) { ex = new MetadataNotFoundException( transfer.getMetadata(), repository ); } else if ( e != null ) { ex = new MetadataTransferException( transfer.getMetadata(), repository, e ); } transfer.setException( ex ); return ex; }
@Override public void transferFailed( Exception exception, int classification ) { MetadataTransferException e; if ( classification == Transporter.ERROR_NOT_FOUND ) { e = new MetadataNotFoundException( getTransfer().getMetadata(), repository ); } else { e = new MetadataTransferException( getTransfer().getMetadata(), repository, exception ); } getTransfer().setException( e ); super.transferFailed( e, classification ); }
@Override public void transferFailed( Exception exception, int classification ) { MetadataTransferException e; if ( classification == Transporter.ERROR_NOT_FOUND ) { e = new MetadataNotFoundException( getTransfer().getMetadata(), repository ); } else { e = new MetadataTransferException( getTransfer().getMetadata(), repository, exception ); } getTransfer().setException( e ); super.transferFailed( e, classification ); }
exception = new MetadataTransferException( metadata, requestRepository, e );
mdEx = new MetadataTransferException( transfer.getMetadata(), repository, e ); break; case METADATA: transfer.setException( new MetadataTransferException( transfer.getMetadata(), repository, t ) ); break;
exception = new MetadataTransferException( metadata, requestRepository, e );