将支付相关的异常抛出,改为异常输出
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user