QScript RuleCheckResult
Jump to navigation
Jump to search
RuleCheckResult
The outcome of rule.check(): whether a Rule's JavaScript ran successfully against a table or plot, and if not, why.
column
The column the error came from, counting from 1. Null whenever line is null, and null for an error far enough along a line that the JavaScript interpreter stopped counting columns.
line
The line the error came from, counting from 1. Always a line in the Rule's own JavaScript: when the error is raised inside a function the Rule called from includeWeb(), includeFile(), or Displayr's own helpers, this is the line holding that call. Null when the JavaScript interpreter reported no line at all.
message
The error text, the form.ruleNotApplicable() reason, or the control validation message. Null when status is 'Good'.
ok
True only when status is 'Good'.
status
'Good': the JavaScript ran cleanly. 'NotApplicable': the JavaScript ran but declined the table or plot by calling form.ruleNotApplicable(), which usually means the wrong table rather than wrong code. 'ValidationFailed': a control's value failed validation, so the parameters need fixing rather than the code. 'Failed': the JavaScript could not run, or stopped the output with table.suppressOutput().
type
Returns 'RuleCheckResult'.