Loading TOC...

console.assert

console.assert(
   $value as Boolean,
   [$message as xs.anyAtomicType],
   [$valueN as xs.anyAtomicType,...]
) as null

Summary

If value is true, do nothing. If value is false, logs a message to the ErrorLog.txt.

Parameters
$value the value to be checked
$message If the message contains any placeholders, each placeholder is replaced with the converted value from its corresponding argument. Here are the placeholders:
  • %s - String
  • %d - Number (both integer and float)
  • %j - JSON. Replaced with the string '[Circular]' if the argument contains circular references.
  • % - single percent sign ('%'). This does not consume an argument.
$valueN A value.

Example

var count = 5;
console.assert(count==5,"hello world");
// logs to ErrorLog.txt

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy