public String parseExceptionErrorMsg()

in src/main/java/com/aliyuncs/kms/secretsmanager/client/utils/CommonLogger.java [90:105]


    public String parseExceptionErrorMsg(String format, Object[] parameters) {
        if (parameters != null && parameters.length > 0) {
            Object parameter = parameters[parameters.length - 1];
            if (parameter instanceof ClientException) {
                ClientException ce = (ClientException) parameter;
                format = format + String.format("\tmodeName:%s\terrorCode:%s\terrMsg:%s\terrorType:%s\terrorDescription:%s\trequestId:%s", modeName, ce.getErrCode(), ce.getErrMsg(), ce.getErrorType(), ce.getErrorDescription(), ce.getRequestId());
            } else if (parameter instanceof Throwable) {
                Throwable e = (Throwable) parameter;
                if (e.getCause() != null && e.getCause() instanceof ClientException) {
                    ClientException ce = (ClientException) e.getCause();
                    format = format + String.format("\tmodeName:%s\terrorCode:%s\terrMsg:%s\terrorType:%s\terrorDescription:%s\trequestId:%s", modeName, ce.getErrCode(), ce.getErrMsg(), ce.getErrorType(), ce.getErrorDescription(), ce.getRequestId());
                }
            }
        }
        return format;
    }