error(message, [show_stack_trace])

Description:

Displays a dialog windows with error message and error icon.

Parameters:

Name Type Default Description

message

string | Error

Error message to display or Error object to display stack trace.

[show_stack_trace]

boolean

true

Whether to show stack trace to be able to trace the error (applies only when first parameter is not an Error object).

Returns:

Does not return a value

Type: void

Examples:

Showing an error message only:

error("Invalid parameters passed.", false);

Showing an error message with a stack trace:

error("Invalid parameters passed.");

Showing an error message by passing an Error object:

try
{
    // some code that may throw an error
}
catch(ex)
{
    error(ex);
}