Skip to main content

ShowError

Shows an error/warning message.

Syntax

expression.ShowError(error, level);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
errorRequiredstringThe error text.
levelRequirednumber-1 or 0 for error or warning.

Returns

This method doesn't return any data.

Example

const text = 'Message you want to show';
const level = 0; // Warning, not an error
Asc.plugin.executeMethod('ShowError', [text, level]);