Tabnine Logo
ClientException
Code IndexAdd Tabnine to your IDE (free)

How to use
ClientException
in
com.aliyuncs.exceptions

Best Java code snippets using com.aliyuncs.exceptions.ClientException (Showing top 20 results out of 315)

origin: pig4cloud/pig

} catch (ClientException e) {
  log.error("初始化SDK 异常", e);
  e.printStackTrace();
} catch (ClientException e) {
  log.error("发送异常");
  e.printStackTrace();
origin: com.aliyun/aliyun-java-sdk-core

  private ClientException newUnmarshalException(Class<?> clazz, String xmlContent, Exception e) {
    return new ClientException("SDK.UnmarshalFailed",
        "unmarshal response from xml content failed, clazz = " + clazz.getSimpleName() + ", origin response = " + xmlContent, e);
  }
}
origin: spring-cloud-incubator/spring-cloud-alibaba

if (e.getErrCode().equals("InvalidAccessKeyId.NotFound")) {
  logger.error("PullMessageTask_execute_error,messageType:"
      + messageType + ",queueName:" + queueName
      + ",please check AccessKeyId", e);
if (e.getErrCode().equals("SignatureDoesNotMatch")) {
  logger.error("PullMessageTask_execute_error,messageType:"
      + messageType + ",queueName:" + queueName
origin: CloudSlang/cs-actions

private static AcsResponse getResponse(final String proxyHost,
                    final String proxyPort,
                    final String proxyUsername,
                    final String proxyPassword,
                    final IAcsClient client,
                    final AcsRequest request) {
  try {
    if (!isEmpty(proxyHost)) {
      // Set JVM proxies during runtime
      ProxyUtil.setProxies(proxyHost, proxyPort, proxyUsername, proxyPassword);
      //Thread.sleep(30000);
    }
    return client.getAcsResponse(request);
  } catch (ClientException e) {
    throw new RuntimeException(e.getMessage());
  } finally {
    if (!isEmpty(proxyHost)) {
      //Clear proxies
      ProxyUtil.clearProxy();
    }
  }
}
origin: com.quhaodian.discover/discover-plug-alidayu

  DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);
} catch (ClientException e) {
  e.printStackTrace();
  e.printStackTrace();
  result.setCode(-1);
  result.setMsg(e.getErrMsg());
origin: com.aliyun/aliyun-java-sdk-core

public ClientException(String errCode, String errMsg, String requestId) {
  this(errCode, errMsg);
  this.requestId = requestId;
  this.setErrorType(ErrorType.Client);
}
origin: com.aliyun/aliyun-java-sdk-core

  response = client.getAcsResponse(describeEndpointsRequest);
} catch (ClientException e) {
  if ("InvalidRegionId".equals(e.getErrCode())
      && "The specified region does not exist.".equals(e.getErrMsg())) {
  } else if ("Illegal Parameter".equals(e.getErrCode())
      && "Please check the parameters".equals(e.getErrMsg())) {
origin: com.aliyun/aliyun-java-sdk-core

  @Override
  public String getMessage() {
    return super.getMessage() + (null == getRequestId() ? "" : "\r\nRequestId : " + getRequestId());
  }
}
origin: cn.org.faster/faster-framework-sms

  @Override
  public boolean send(SendSmsRequest request) {
    try {
      IAcsClient acsClient = new DefaultAcsClient(profile);
      request.setMethod(MethodType.POST);
      SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
      if (sendSmsResponse.getCode() != null && sendSmsResponse.getCode().
          equals("OK")) {
        return true;
      }
    } catch (ClientException e) {
      log.error(e.getMessage());
      return false;
    }
    return false;
  }
}
origin: com.aliyun/aliyun-java-sdk-core

public ClientException(String errCode, String errMsg) {
  super(errCode + " : " + errMsg);
  this.errCode = errCode;
  this.errMsg = errMsg;
  this.setErrorType(ErrorType.Client);
}
origin: com.quhaodian.discover/discover-plug-alidayu

  @Override
  public String getMessage() {
    return super.getMessage() + (null == getRequestId() ? "" : "\r\nRequestId : " + getRequestId());
  }
}
origin: cn.org.faster/faster-sms

public AliSmsService(String accessKeyId, String accessKeySecret) {
  try {
    //初始化ascClient,暂时不支持多region(请勿修改)
    profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId,
        accessKeySecret);
    DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
  } catch (ClientException e) {
    e.printStackTrace();
  }
}
origin: com.aliyun/aliyun-java-sdk-core

  private ClientException newUnmarshalException(Class<?> clazz, String content, Exception e) {
    return new ClientException("SDK.UnmarshalFailed",
        "unmarshal response from json content failed, clazz = " + clazz.getSimpleName() + ", origin response = " + content, e);
  }
}
origin: cn.org.faster/faster-sms

  @Override
  public boolean send(SendSmsRequest request) {
    try {
      IAcsClient acsClient = new DefaultAcsClient(profile);
      request.setMethod(MethodType.POST);
      SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
      if (sendSmsResponse.getCode() != null && sendSmsResponse.getCode().
          equals("OK")) {
        return true;
      }
    } catch (ClientException e) {
      log.error(e.getMessage());
      return false;
    }
    return false;
  }
}
origin: com.aliyun/aliyun-java-sdk-core

public ClientException(String message) {
  super(message);
  this.setErrorType(ErrorType.Client);
}
origin: cn.org.faster/faster-framework-sms

public AliSmsService(String accessKeyId, String accessKeySecret) {
  try {
    //初始化ascClient,暂时不支持多region(请勿修改)
    profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId,
        accessKeySecret);
    DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
  } catch (ClientException e) {
    e.printStackTrace();
  }
}
origin: com.aliyun/aliyun-java-sdk-core

public String getHttpContentString() throws ClientException {
  String stringContent = "";
  if (this.httpContent != null) {
    try {
      if (this.encoding == null) {
        stringContent = new String(this.httpContent);
      } else {
        stringContent = new String(this.httpContent, this.encoding);
      }
    } catch (UnsupportedEncodingException exp) {
      throw new ClientException("SDK.UnsupportedEncoding", "Can not parse response due to unsupported encoding.");
    }
  }
  return stringContent;
}
origin: xautlx/s2jh4net

return e.getMessage();
origin: com.aliyun/aliyun-java-sdk-core

public ClientException(String errCode, String errMsg, Throwable cause) {
  super(errCode + " : " + errMsg, cause);
  this.errCode = errCode;
  this.errMsg = errMsg;
  this.setErrorType(ErrorType.Client);
}
origin: ixrjog/opsCloud

private DescribeRegionsResponse sampleDescribeRegionsResponse(DescribeRegionsRequest describe) {
  IAcsClient client = acqIAcsClient(EcsServiceImpl.regionIdCnHangzhou);
  try {
    DescribeRegionsResponse response
        = client.getAcsResponse(describe);
    return response;
  } catch (ServerException e) {
    e.printStackTrace();
    return null;
  } catch (ClientException e) {
    e.printStackTrace();
    return null;
  }
}
com.aliyuncs.exceptionsClientException

Most used methods

  • printStackTrace
  • getMessage
  • <init>
  • getErrCode
  • getErrMsg
  • getRequestId
  • setErrorType
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JTable (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now