FailureQ

FailureQ[expr]

gives True if expr has head Failure or is equal to $Failed or $Aborted.

Examples

open allclose all

Basic Examples  (1)

Test whether an expression represents a "failure":

Select expressions that do not represent failure:

Properties & Relations  (1)

$Failed is returned when an operation cannot be performed:

Failure objects are returned by functions like Interpreter when they cannot produce a result:

$Aborted is returned when Abort[] executes or when the user manually aborts a computation:

Possible Issues  (2)

The symbol Failure on its own does not represent failure:

Failure of a function to evaluate or the production of messages is not considered to represent failure:

Use Check to detect when an evaluation produces messages:

Wolfram Research (2015), FailureQ, Wolfram Language function, https://reference.wolfram.com/language/ref/FailureQ.html.

Text

Wolfram Research (2015), FailureQ, Wolfram Language function, https://reference.wolfram.com/language/ref/FailureQ.html.

CMS

Wolfram Language. 2015. "FailureQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FailureQ.html.

APA

Wolfram Language. (2015). FailureQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FailureQ.html

BibTeX

@misc{reference.wolfram_2024_failureq, author="Wolfram Research", title="{FailureQ}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/FailureQ.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_failureq, organization={Wolfram Research}, title={FailureQ}, year={2015}, url={https://reference.wolfram.com/language/ref/FailureQ.html}, note=[Accessed: 22-December-2024 ]}