private BaseHandlerException convertException()

in aws-ecr-registrypolicy/src/main/java/software/amazon/ecr/registrypolicy/BaseHandlerStd.java [79:95]


  private BaseHandlerException convertException(final Exception e) {
    BaseHandlerException ex;

    if (e instanceof RegistryPolicyNotFoundException) {
      ex = new CfnNotFoundException(e);
    } else if (e instanceof InvalidParameterException || e instanceof ValidationException) {
      ex = new CfnInvalidRequestException(e);
    } else if (e instanceof SdkException) {
      ex = new CfnServiceInternalErrorException(e);
    } else if (e instanceof CfnAlreadyExistsException) {
      ex = new CfnAlreadyExistsException(e);
    } else {
      ex = new CfnGeneralServiceException(e);
    }

    return ex;
  }