将支付相关的异常抛出,改为异常输出

This commit is contained in:
Martin
2024-07-09 11:11:05 +08:00
parent 9c38f40098
commit eb9f615f70
5 changed files with 31 additions and 27 deletions

View File

@@ -135,7 +135,7 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
object.put("orderList", orderList);
object.put("tradeNo", tradeNo);
} catch (JSONException e) {
throw new RuntimeException(e);
e.printStackTrace();
}
return object;
}
@@ -196,11 +196,12 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
try {
return AdvertisingIdClient.getAdvertisingIdInfo(mContext).getId();
} catch (IOException e) {
throw new RuntimeException(e);
e.printStackTrace();
return "";
} catch (GooglePlayServicesNotAvailableException e) {
throw new RuntimeException(e);
e.printStackTrace(); return "";
} catch (GooglePlayServicesRepairableException e) {
throw new RuntimeException(e);
e.printStackTrace(); return "";
}
}
@@ -221,7 +222,7 @@ public class GoogleBillingManage implements PurchasesUpdatedListener {
object.put("resultToken", resultToken);
object.put("resultOrderId", resultOrderId);
} catch (JSONException e) {
throw new RuntimeException(e);
e.printStackTrace();
}
return object;
}