|
@@ -2,6 +2,7 @@ package cn.com.qmth.examcloud.exchange.inner.service.upyun;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileInputStream;
|
|
|
|
+import java.io.FileNotFoundException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.security.MessageDigest;
|
|
import java.security.MessageDigest;
|
|
@@ -123,8 +124,8 @@ public class UpYunClient {
|
|
try {
|
|
try {
|
|
in = new FileInputStream(file);
|
|
in = new FileInputStream(file);
|
|
return writeFile(filePath, in);
|
|
return writeFile(filePath, in);
|
|
- } catch (Exception e) {
|
|
|
|
- throw new StatusException("EX-100001", "upyun upload failure");
|
|
|
|
|
|
+ } catch (FileNotFoundException e) {
|
|
|
|
+ throw new ExamCloudRuntimeException(e);
|
|
} finally {
|
|
} finally {
|
|
IOUtils.closeQuietly(in);
|
|
IOUtils.closeQuietly(in);
|
|
}
|
|
}
|