接入 Android

} } throw new KeyManagementException("Failed to find an X509TrustManager in"+Arrays.toString(tms));} private static final class X509TrustManagerWrapper implements X509TrustManager { private final X509TrustManager x509...

创建Token

throw new Error(error)} const data=responseBody.data if(data=null){ throw new Error("failed to create token");} console.log('token:'+data.token+',expiredTime:'+data.expiredTime);} catch(err){ console.log('failed to create ...

基于Node.js的应用开发

connection.query('show databases',function(err1,results,fields){ if(err1){ throw err1;} console.log(fields)console.log(results)});connection.end(function(err2){ if(err2){ throw err2;} console.log("Connection closed.");});}...

链路追踪

} catch(TTransportException e){ throw new RuntimeException(e);} SpanContext spanContext=contextFromString(context.getTracing().getSpanContext());startMySpan(io.opentelemetry.context.Context.current().with(Span.wrap...

org_json_JSONException

could throw IE playerTwo=players.waitForPlayer();could throw IE startNewGame(playerOne,playerTwo);} } catch(InterruptedException e){/If we got one player and were interrupted,put that player back if(playerOne!null)players....

超时配置

老版 SDK 的超时机制为 Request 设置->Client 设置->默认,优先级依次降低...request超时设置,仅对当前请求有效$request->connectTimeout(0.01)/Throw an exception when Connection timeout->timeout(0.01);Throw an exception when timeout

性能压测

加钱操作*/Override public boolean amountAdd(finalString businessKey,final String accountNo,final BigDecimal amount,final Map,Object>extParams){ try { if(amount.compareTo(BigDecimal.ZERO)){ throw new RuntimeException("金额...

Node.js

connection.query('SELECT count(*)AS count FROM information_schema.tables',function(err1,results,fields){ if(err1){ throw err1;} console.log('Count:'+results[0].count);});connection.end(function(err2){ if(err2){ throw err2;...

使用云助手在Windows实例中安装OpenSSH程序

curDir=$PSScriptRoot Set-Location$curDir#Check the OS version$OSversion=[Environment]:OSVersion.Version if($OSversion.Major-lt 6-and$OSversion.Minor-lt 1){ throw"This scrip is not supported on Windows 2008 or lower"}$Arch=...

TypeScript 请求构造示例

constructor(config:Config){ if(Util.isUnset($tea.toMap(config))){ throw$tea.newError({ name:"ParameterMissing",message:"'config' can not be unset",});} if(Util.empty(config.type)){ config.type="access_key;} let ...

TypeScript 请求构造示例

constructor(config:Config){ if(Util.isUnset($tea.toMap(config))){ throw$tea.newError({ name:"ParameterMissing",message:"'config' can not be unset",});} if(Util.empty(config.type)){ config.type="access_key;} let ...

使用云助手在Windows实例中安装Python

{ throw"Clear$file_path error,please check"} } }#install python for all users function Install-Python(){ if($pythonVersion.StartsWith("2")){&cmd/c msiexec/i$pythonFile/quiet/norestart ADDLOCAL=ALL } else {&cmd/c$pythonFile...

错误处理

nodejs-fc-err-es export const handler=async(event,context)=>{ throw new Error('oops');};CommonJS模块 exports.handler=function(event,context,callback){ throw new Error('oops');};收到的响应示例如下所示。{"errorMessage":"oops...

多任务示例

1){ throw new IOException("res_table should have 1 record,but:"+count);} Record record=context.createOutputRecord();v-;record.set(0,v);context.write(record);设置counter,counter在作业成功结束后,可以在main函数中获取到。...

使用Java SDK管理Project

throw e;} } } 预期结果如下:ready to create project create project ali-test-project success 修改Project示例代码 以下代码用于修改名为ali-test-project的Project描述信息。import com.aliyun.openservices.log.Client;import ...

自定义审批系统对接接口

signature.equals(msgSignature)){ throw new ThirdPartyEncryptException(ThirdPartyEncryptException.COMPUTE_SIGNATURE_ERROR);}/解密 return decrypt(encryptMsg);}/*对明文加密.*@param plaintext 需要加密的明文*@return 加密后base...

参数加密说明

throw new RuntimeException(e);} }/*SM2 加密*@param content 需要加密的内容*@return 加密后的密文*/public static String encrypt(String content){ try { String contentEncrypt=Base64.getEncoder().encodeToString(cipher.doFinal...

C# 请求构造示例

public Client(Config config){ if(AlibabaCloud.TeaUtil.Common.IsUnset(config.ToMap())){ throw new TeaException(new Dictionary,string>{ {"name","ParameterMissing"},{"message","'config' can not be unset"},});} if(AlibabaCloud...

Saga 模式快速入门

Override public boolean amountMinus(final String businessKey,final String accountNo,final BigDecimal amount,final Map,Object>extParams){ try{ if(amount.compareTo(BigDecimal.ZERO)){ throw new RuntimeException("金额必须大小0...

C# 请求构造示例

public Client(Config config){ if(AlibabaCloud.TeaUtil.Common.IsUnset(config.ToMap())){ throw new TeaException(new Dictionary,string>{ {"name","ParameterMissing"},{"message","'config' can not be unset"},});} if(AlibabaCloud...

使用Java SDK管理消费组

throw e;} } } 预期结果如下:ready to create consumergroup create consumergroup ali-test-consumergroup success 修改消费组示例代码 以下代码用于修改名为ali-test-consumergroup的消费组信息。import ...

导入非对称密钥材料

您可以将源环境(通常为线下的密钥管理设施KMI,或者线下的硬件安全模块HSM)生成的非对称密钥导入专属KMS标准版实例。本文介绍如何将非对称密钥材料导入专属KMS标准版实例。背景信息 您可以调用 DescribeKey 接口判断非对称密钥材料来源。...

文本向量调用参考

} catch(Exception e){ throw new BaiLianSdkException(e);} } } Python import os from alibabacloud_bailian20230601.client import Client from alibabacloud_bailian20230601.models import CreateTextEmbeddingsRequest from ...

错误处理

php function handler($event,$context){ throw new Exception("oops");} 根据以上示例代码,您调用函数时可能会收到以下响应信息。{"errorMessage":"oops","errorType":"Exception","stackTrace":{"file":"/code/index.php","line":3,...

使用Java SDK管理机器组

throw e;} } } 预期结果如下:ready to create machinegroup create machinegroup ali-test-machinegroup success 修改机器组示例代码 以下代码用于修改名为ali-test-machinegroup的IP地址机器组。import ...

云数据库查询优化

success){ throw new Error("findOne return success false");} if(affectedDocs>0){ const newId=findOneResult.result._id;minId=newId;count+skip;} else { break;} } const query={_id:{$gte:minId } };const countResult=await ...

错误处理

php function handler($event,$context){ throw new Exception("oops");} 根据以上示例代码,您调用函数时可能会收到以下响应信息。{"errorMessage":"oops","errorType":"Exception","stackTrace":{"file":"/code/index.php","line":3,...

使用Java SDK管理日志库Logstore

throw e;} } } 预期结果如下:ready to create logstore create logstore ali-test-logstore success 修改Logstore示例代码 以下代码用于修改名为ali-test-logstore的Logstore配置信息。import com.aliyun.openservices.log.Client;import ...

JS异常捕获插桩工具

scripts":"build":"webpack-progress-env=production-config./build/webpack.prod.js-profile",},/npm run build/目标插桩示例 const Index=()=>{ try { throw new Error("发生错误")} catch(error){/插桩前 console.log(error);...

UDF示例:兼容Hive

public class Collect extends GenericUDF {@Override public ObjectInspector initialize(ObjectInspector[]objectInspectors)throws UDFArgumentException { if(objectInspectors.length=0){ throw new UDFArgumentException("Collect:...

Java SDK

} catch(Exception e){ throw new RuntimeException(e);}/构造检测图片中的人脸及人脸信息请求。DetectImageFacesRequest detectImageFacesRequest=new DetectImageFacesRequest();detectImageFacesRequest.setProjectName(Sample....

使用Java SDK管理快速查询

throw e;} } } 预期结果如下:ready to create savedsearch create savedsearch ali-test-savedsearch success 修改快速查询示例代码 以下代码用于修改名为ali-test-savedsearch的快速查询。import com.aliyun.openservices.log.Client;...

底纹Demo

throw;} } private static void Main(string[]args){ var runtime=new RuntimeOptions { ConnectTimeout=5000,ReadTimeout=10000,MaxAttempts=0,Autoretry=false,IgnoreSSL=false,MaxIdleConns=50 };var config=new Config {/配置统一的...

导入非对称密钥材料

当创建密钥材料来源为外部的非对称密钥时,KMS不会生成密钥材料,您需要导入自己的密钥材料。本文介绍如何为非对称密钥导入密钥材料。重要 如果您的软件密钥管理实例、硬件密钥管理实例不支持导入密钥材料,或者导入密钥材料时返回失败,请...

热搜Demo

throw;} } private static void Main(string[]args){ var runtime=new RuntimeOptions { ConnectTimeout=5000,ReadTimeout=10000,MaxAttempts=0,Autoretry=false,IgnoreSSL=false,MaxIdleConns=50 };var config=new Config {/配置统一的...

.NET

} catch(System.Security.Cryptography.CryptographicUnexpectedOperationException e){ throw new System.Security.Cryptography.CryptographicUnexpectedOperationException(String.Format("VerifySignature Failed:RSADeformatter....

搜索Demo

throw;} } private static void Main(string[]args){ var runtime=new RuntimeOptions { ConnectTimeout=5000,ReadTimeout=10000,MaxAttempts=0,Autoretry=false,IgnoreSSL=false,MaxIdleConns=50 };var config=new Config {/配置统一的...

搜索Demo

throw;} } private static void Main(string[]args){ var runtime=new RuntimeOptions { ConnectTimeout=5000,ReadTimeout=10000,MaxAttempts=0,Autoretry=false,IgnoreSSL=false,MaxIdleConns=50 };var config=new Config {/配置统一的...

使用资源示例

} } catch(FileNotFoundException ex){ throw new IOException(ex);} catch(IOException ex){ throw new IOException(ex);} finally { } }@Override public void map(long recordNum,Record record,TaskContext context)throws IOException...

下拉提示Demo

throw;} } private static void Main(string[]args){ var runtime=new RuntimeOptions { ConnectTimeout=5000,ReadTimeout=10000,MaxAttempts=0,Autoretry=false,IgnoreSSL=false,MaxIdleConns=50 };var config=new Config {/配置统一的...
共有8条 < 1 2 3 4 ... 8 >
跳转至: GO
产品推荐
云服务器 安全管家服务 安全中心
这些文档可能帮助您
弹性公网IP 短信服务 人工智能平台 PAI 金融分布式架构 对象存储 邮件推送
新人特惠 爆款特惠 最新活动 免费试用