百度智能云

All Product Document

          Key Management Service

          Exception Handling

          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());
          }
          Previous
          Key Management
          Next
          Version Change Record