Difference between revisions of "Error"
Line 1: | Line 1: | ||
− | [[ | + | [[Category:User-interface functions]] |
+ | [[Category: Error messages]] | ||
[[Category:Doc Status C]] <!-- For Lumina use, do not change --> | [[Category:Doc Status C]] <!-- For Lumina use, do not change --> | ||
[[category:Evaluation Functions]] | [[category:Evaluation Functions]] | ||
− | = Function Error(message) = | + | == Function Error(message) == |
− | |||
Reports an evaluation-time error, displaying the indicated «message» to the end user in a dialog box and ending the current computation. | Reports an evaluation-time error, displaying the indicated «message» to the end user in a dialog box and ending the current computation. | ||
− | If the expression in a [[Check Attribute]] calls [[Error]](), it displays the error message as a warning dialog, instead of the default failed-check message that otherwise appears when the [[Check Attribute]] evaluates to False (0) | + | If the expression in a [[Check Attribute]] calls [[Error]](), it displays the error message as a warning dialog, instead of the default failed-check message that otherwise appears when the [[Check Attribute]] evaluates to <code>False</code> (0). |
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | + | == Examples == |
+ | :<code>If not IsNumber(x) Then Error("Something is wrong. x is not numeric.");</code> | ||
+ | == See Also == | ||
+ | * [[Dialog_Functions#Error.28message.29|Error]] | ||
* [[Check Attribute]] | * [[Check Attribute]] | ||
* [[MsgBox]] | * [[MsgBox]] |
Revision as of 00:32, 9 February 2016
Function Error(message)
Reports an evaluation-time error, displaying the indicated «message» to the end user in a dialog box and ending the current computation.
If the expression in a Check Attribute calls Error(), it displays the error message as a warning dialog, instead of the default failed-check message that otherwise appears when the Check Attribute evaluates to False
(0).
Examples
If not IsNumber(x) Then Error("Something is wrong. x is not numeric.");
See Also
Comments
Enable comment auto-refresher