Skip to content

Commit

Permalink
update qiniu exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sxci committed Sep 10, 2020
1 parent c045cd4 commit cda5259
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/qiniu/common/QiniuException.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ public QiniuException(Exception e) {
}

public QiniuException(Exception e, String msg) {
super(msg, e);
super(msg != null ? msg : (e != null ? e.getMessage() : null), e);
this.response = null;
this.error = msg;
}

public String url() {
return response.url();
return response != null ? response.url() : "";
}

public int code() {
return response == null ? -1 : response.statusCode;
return response != null ? response.statusCode : -1;
}

public String error() {
Expand Down

0 comments on commit cda5259

Please sign in to comment.