✨ feat(tsl-api-reference): expand API and module coverage
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
# Dotnet - 客户端函数
|
||||
|
||||
## `assert(error)`
|
||||
## `assert(check, error_message)`
|
||||
|
||||
声明:function
|
||||
|
||||
断言。若Check为假,返回出错信息
|
||||
检查条件,条件为假时中止执行并返回指定错误信息
|
||||
|
||||
<!-- tags: 客户端函数 -->
|
||||
<!-- tags: 客户端 错误处理 断言 assert error -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ------ | ---------- |
|
||||
| `error` | string | 字符串类型 |
|
||||
| 参数 | 类型 | 说明 |
|
||||
| --------------- | ------- | -------------------- |
|
||||
| `check` | boolean | 要检查的条件 |
|
||||
| `error_message` | string | 条件为假时的错误信息 |
|
||||
|
||||
返回:string
|
||||
返回:error
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:检查通过时继续执行
|
||||
|
||||
```tsl
|
||||
return assert(0, '无效的语段');
|
||||
// 输出:错误信息(触发断言)
|
||||
return assert(1, "probe");
|
||||
// 输出:0
|
||||
```
|
||||
|
||||
## `checkDataCanBeExtract(data)`
|
||||
@@ -363,7 +366,7 @@ return incPrecodeCallBack('000002.SZ');
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ------ | -------------------------- |
|
||||
| `data` | any | 要发送到运行结果窗口的数据 |
|
||||
| `nwdow` | string | 可选,结果窗口名称 |
|
||||
| `nwdow` | string | 可选。结果窗口名称 |
|
||||
|
||||
返回:any
|
||||
|
||||
|
||||
Reference in New Issue
Block a user