assert_err

Returns an error when an assertion has failed.

This function does not generate an event.

Function

assert_err([message])

Arguments

Argument Type Description
message str (optional) Alternative error message.

Return value

An error value.

Example

This code shows assert_err():

assert_err();

Return value in JSON format

{
    "!": "assert_err()",
    "error_code": -50,
    "error_msg": "assertion statement has failed"
}