本文整理汇总了Java中org.eclipse.aether.transfer.TransferEvent.getException方法的典型用法代码示例。如果您正苦于以下问题:Java TransferEvent.getException方法的具体用法?Java TransferEvent.getException怎么用?Java TransferEvent.getException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.aether.transfer.TransferEvent
的用法示例。
在下文中一共展示了TransferEvent.getException方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: failuresAsString
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
public String failuresAsString() {
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, List<TransferEvent>> entry : this.transfers.entrySet()) {
final String resourceName = entry.getKey();
for (TransferEvent event : entry.getValue()) {
sb.append("Failed")
.append(event.getRequestType() == TransferEvent.RequestType.PUT ? " uploading " : " downloading ")
.append(resourceName)
.append(event.getRequestType() == TransferEvent.RequestType.PUT ? " into " : " from ")
.append(event.getResource().getRepositoryUrl()).append(". ");
if (event.getException() != null) {
sb.append("Reason: \n").append(event.getException());
}
sb.append('\n');
}
}
return sb.toString();
}
示例2: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed(TransferEvent event) {
TransferResource resource = event.getResource();
downloads.remove(resource);
StringBuilder sb = new StringBuilder().append("Failed")
.append(event.getRequestType() == TransferEvent.RequestType.PUT ? " uploading " : " downloading ")
.append(resource.getResourceName())
.append(event.getRequestType() == TransferEvent.RequestType.PUT ? " into " : " from ")
.append(resource.getRepositoryUrl()).append(". ");
if (event.getException() != null) {
sb.append("Reason: \n").append(event.getException());
}
logger.warn(sb.toString());
}
示例3: transferCorrupted
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferCorrupted(TransferEvent event) {
TransferResource resource = event.getResource();
downloads.remove(resource);
StringBuilder sb = new StringBuilder().append("Corrupted")
.append(event.getRequestType() == TransferEvent.RequestType.PUT ? " upload of " : " download of ")
.append(resource.getResourceName())
.append(event.getRequestType() == TransferEvent.RequestType.PUT ? " into " : " from ")
.append(resource.getRepositoryUrl()).append(". ");
if (event.getException() != null) {
sb.append("Reason: \n").append(event.getException());
}
logger.warn(sb.toString());
}
示例4: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed( TransferEvent event ){
transferCompleted( event );
if ( !( event.getException() instanceof MetadataNotFoundException ) ){
event.getException().printStackTrace( out );
}
}
示例5: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed(TransferEvent event) {
transferCompleted(event);
if (!(event.getException() instanceof MetadataNotFoundException)) {
event.getException().printStackTrace(out);
}
}
示例6: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed(TransferEvent event) {
transferCompleted(event);
if (!(event.getException() instanceof MetadataNotFoundException)) {
logger.debug("", event.getException());
}
}
示例7: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed( TransferEvent event )
{
transferCompleted( event );
if ( !( event.getException() instanceof MetadataNotFoundException ) )
{
logger.info( event.getException().getMessage() );
}
}
示例8: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed(TransferEvent event) {
transferCompleted(event);
if (!(event.getException() instanceof MetadataNotFoundException)) {
logger.error("Transfer failed", event.getException());
}
}
示例9: transferFailed
import org.eclipse.aether.transfer.TransferEvent; //导入方法依赖的package包/类
@Override
public void transferFailed(TransferEvent event) {
transferCompleted(event);
if (!(event.getException() instanceof MetadataNotFoundException)) {
event.getException().printStackTrace(out);
}
}