public Exception getException() { if ( artifactTransfer != null ) { return artifactTransfer.getException(); } else if ( metadataTransfer != null ) { return metadataTransfer.getException(); } else { throw new IllegalStateException( "TransferWrapper holds the wrong type" ); } }