Difference between revisions of "Error"
(documented «url» parameter) |
|||
Line 5: | Line 5: | ||
[[category:Evaluation Functions]] | [[category:Evaluation Functions]] | ||
− | == Function Error(message) == | + | == Function Error(message'', url, urlText'') == |
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 <code>False</code> (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). | ||
+ | |||
+ | The optional «url» and «urlText» can be specified if you want to include a hyperlink on the error's message box. For example: | ||
+ | :<code>[[Error]]( "The matrix to MapKernel must be positive definite", | ||
+ | ::url: "https://mywebsite.com/Details/Using_MapKernel.html", | ||
+ | ::urlText:"Info on this error")</code> | ||
== Examples == | == Examples == |
Revision as of 18:57, 14 June 2019
Function Error(message, url, urlText)
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).
The optional «url» and «urlText» can be specified if you want to include a hyperlink on the error's message box. For example:
Error( "The matrix to MapKernel must be positive definite",
- url: "https://mywebsite.com/Details/Using_MapKernel.html",
urlText:"Info on this error")
Examples
If not IsNumber(x) Then Error("Something is wrong. x is not numeric.");
See Also
Comments
Enable comment auto-refresher