You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caused by: java.io.FileNotFoundException: http://v0.api.upyun.com/xxxxxx/path/to/file
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at main.java.com.UpYun.getText(UpYun.java:906)
api:获取文件信息,上面说的是当指定文件不存在时返回null。但是实际上当不存在时会抛出异常:
因为上传文件会存在覆盖问题,因此需要使用该api来进行文件判定(文档上面是这样写的)。
个人感觉在业务逻辑当中通过异常来进行判断不太优雅,可能使得业务逻辑的异常和真正出现的异常相混淆而出错。建议修复此问题
The text was updated successfully, but these errors were encountered: