Exception handling
Updated at:2025-10-20
BCC exception prompts are available in the following two ways:
| Exception type | Description |
|---|---|
| BceClientException | Client exception |
| BceServerException | Server exception |
Users can use try to obtain the exception generated by a certain event, e.g.:
Java
1String instanceId = 'instanceId';
2try {
3 bccClient.getInstance(instanceId);
4} catch (BceServiceException bce){
5 System.out.println(bce.getMessage());
6} catch ( BceClientException bce){
7 System.out.println( bce.getMessage());
8}
