assert_checkerror
Historical name for asserts.checkerror.
📝Syntax
assert_checkerror(command, expectedMessage)
assert_checkerror(command, expectedMessage, expectedIdentifier)
[res, msg] = assert_checkerror(command, expectedMessage)
📥Input Arguments
Parameter Description
command Command string evaluated in the current context.
expectedMessage Expected full error message.
expectedIdentifier Optional expected error identifier.
📤Output Arguments
Parameter Description
res true if the expected error is produced, false otherwise.
msg Assertion failure message, empty on success.
📄Description

assert_checkerror is kept for compatibility.

For complete documentation, use asserts.checkerror.

Use asserts.throws when only a message substring must match.

💡Examples
Historical call
assert_checkerror('cos', _('Wrong number of input arguments.'));
Canonical call
asserts.checkerror('cos', _('Wrong number of input arguments.'));
🔗See Also
asserts.checkerrorasserts.throwsasserts.noError
🕔Version History
Version Description
1.0.0 initial version
2.0.0 documented as historical name for asserts.checkerror
Edit this page on GitHub