ShowError
显示错误/警告消息。
语法
expression.ShowError(error, level);
expression - 表示 Api 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| error | 必需 | string | 错误文本。 | |
| level | 必需 | number | -1 或 0 表示错误或警告。 |
返回值
此方法不返回任何数据。
示例
const text = 'Message you want to show';
const level = 0; // Warning, not an error
Asc.plugin.executeMethod('ShowError', [text, level]);