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


  • The association assoc typically contains:
  • "MessageTemplate"a string template for a message
    "MessageParameters"parameters to use for the message template
  • The parameters are effectively inserted into the message template using TemplateApply.
  • With the entry "MessageTemplate":>symb::name 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 "InterpretationFailure", "RestrictionFailure", "ConditionFailure", and "ConnectionFailure".


open allclose all

Basic Examples  (2)

A typical way in which Failure is generated:

Show the underlying structure:

Manually construct a failure:

Scope  (10)

Basic Uses  (6)

Create a Failure using only a tag:

Use a tag and a message:

Use a template with positional parameters:

Indicate a failure using a StringTemplate:

Indicate a failure using MessageName:

Failure can contain metadata:

Properties  (4)

Get a list of all the available properties:

Extract the message template, name and parameters:

Extract the message template without evaluating it:

Extract the actual error message:

Properties & Relations  (4)

Use ToString to get the formatted message:

This is equivalent to the "Message" property:

Failure is returned by functions like SendMail and EntityPrefetch:

For these functions, the opposite of Failure is Success:

Failure expressions are FailureQ:

Using an Association with Rule will embed the evaluated expression into the Failure expression:

Use RuleDelayed to prevent evaluation:

Neat Examples  (1)

Generate a dataset with all the properties of a Failure expression:

Introduced in 2014