com.qcloud.cos.exception.Throwables 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;
public class Throwables {
/**
* Used to help perform common throw-up with minimal wrapping.
*/
public static RuntimeException failure(Throwable t) {
if (t instanceof RuntimeException)
return (RuntimeException)t;
if (t instanceof Error)
throw (Error)t;
return t instanceof InterruptedException
? new AbortedException(t)
: new CosClientException(t);
}
}