Failure

Failure["tag",assoc]
represents a failure of a type indicated by tag, with details given by the association assoc.

DetailsDetails

  • The association assoc typically contains:
  • "MessageTemplate"a string template for a message
    "MessageParameters"parameters to use for the message template
  • With the entry a message name can be stored for use when a message is generated.
  • Failure is generated by Interpreter and related functions. Possible tags in this case are , , , and .

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Indicate a failure using a function message:

In[1]:=
Click for copyable input
Out[1]=

Indicate a failure using a StringTemplate:

In[1]:=
Click for copyable input
Out[1]=

Use RuleDelayed to prevent evaluation in an Association:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)
Translate this page: