调整Exception类中的消息描述
This commit is contained in:
@@ -272,7 +272,7 @@ public class MediaApi extends MpApi {
|
||||
file.getAbsolutePath()));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new WeixinException(e.getMessage());
|
||||
throw new WeixinException(e);
|
||||
} finally {
|
||||
try {
|
||||
if (os != null) {
|
||||
@@ -346,7 +346,7 @@ public class MediaApi extends MpApi {
|
||||
return new MediaDownloadResult(content,
|
||||
ContentType.create(contentType), fileName);
|
||||
} catch (IOException e) {
|
||||
throw new WeixinException("I/O Error on getBody");
|
||||
throw new WeixinException("I/O Error on getBody", e);
|
||||
} catch (HttpClientException e) {
|
||||
throw new WeixinException(e);
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ public class Pay2Api extends MpApi {
|
||||
} catch (WeixinException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
throw new WeixinException(e.getMessage());
|
||||
throw new WeixinException(e);
|
||||
} finally {
|
||||
if (ca != null) {
|
||||
try {
|
||||
@@ -389,7 +389,7 @@ public class Pay2Api extends MpApi {
|
||||
writer.newLine();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new WeixinException(e.getMessage());
|
||||
throw new WeixinException(e);
|
||||
} finally {
|
||||
try {
|
||||
if (reader != null) {
|
||||
|
||||
@@ -95,7 +95,7 @@ public class QrApi extends MpApi {
|
||||
os = new FileOutputStream(file);
|
||||
os.write(qrResult.getContent());
|
||||
} catch (IOException e) {
|
||||
throw new WeixinException(e.getMessage());
|
||||
throw new WeixinException(e);
|
||||
} finally {
|
||||
try {
|
||||
if (os != null) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.junit.Test;
|
||||
|
||||
import com.foxinmy.weixin4j.exception.WeixinException;
|
||||
import com.foxinmy.weixin4j.model.WeixinAccount;
|
||||
import com.foxinmy.weixin4j.mp.api.MenuApi;
|
||||
import com.foxinmy.weixin4j.mp.token.WeixinTokenCreator;
|
||||
import com.foxinmy.weixin4j.token.FileTokenStorager;
|
||||
import com.foxinmy.weixin4j.token.TokenHolder;
|
||||
|
||||
Reference in New Issue
Block a user