调整Exception类中的消息描述

This commit is contained in:
jinyu
2015-08-19 09:00:42 +08:00
parent 21e5947ca4
commit 841e1f76f1
10 changed files with 17 additions and 16 deletions
@@ -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) {