Exception Handling
Last Updated:2020-07-20
There are two following ways to warn Billing abnormality:
Exception method | Description |
---|---|
BceClientException | Client exception |
BceServerException | Server exception |
Users can obtain the exception generated by an event with try, for example:
ResourceMonthBillRequest request = new ResourceMonthBillRequest();
try {
billingClient.getResourceMonthBill(request);
} catch (BceServiceException bce){
System.out.println(bce.getMessage());
} catch (BceClientException bce){
System.out.println( bce.getMessage());
}