Exception Handling
Last Updated:2020-07-20
The BCC exception is prompted in the following two ways:
Exception Method | Note |
---|---|
BceClientException | Client exception |
BceServerException | Server exception |
Users can use the command try to obtain the exception generated by an event, for example:
String instanceId = 'instanceId';
try {
bccClient.getInstance(instanceId);
} catch (BceServiceException bce){
System.out.println(bce.getMessage());
} catch ( BceClientException bce){
System.out.println( bce.getMessage());
}