com.qcloud.cos.exception.PauseException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cos_api Show documentation
Show all versions of cos_api Show documentation
qcloud cos sdk for inner tencentyun
The newest version!
package com.qcloud.cos.exception;
import com.qcloud.cos.transfer.PauseStatus;
public class PauseException extends CosClientException {
private static final long serialVersionUID = 1L;
/**
* The reason why the pause operation failed.
*/
private final PauseStatus status;
public PauseException(PauseStatus status) {
super("Failed to pause operation; status=" + status);
if (status == null || status == PauseStatus.SUCCESS)
throw new IllegalArgumentException();
this.status = status;
}
/**
* Returns more information on why the pause failed.
*/
public PauseStatus getPauseStatus() {
return status;
}
/**
* {@inheritDoc} An paused exception is not intended to be retried.
*/
@Override
public boolean isRetryable() {
return false;
}
}