Exception Handling
Last Updated:2020-07-20
Three common ways are used to handle the KMS exceptions
Exception method | Description |
---|---|
BceServiceException | Server exception |
BceClientException | Client exception |
Exception | Anthology of exceptions |
Note: the order of the catch exception here Users can obtain the exception generated by an event with try, for example:
try {
//Operation
} catch (BceServiceException e) {
System.out.println(e.getMessage());
} catch (BceClientException e) {
System.out.println(e.getMessage());
} catch (Exception e) {
System.out.println(e.getMessage());
}