Failsafe[f][x1,x2,…]
returns f[x1,x2,…] if none of the xi is considered a failure, and the first failing xi otherwise.


Failsafe
Failsafe[f][x1,x2,…]
returns f[x1,x2,…] if none of the xi is considered a failure, and the first failing xi otherwise.
Details

- Failsafe is typically used to create safe versions of functions that can be applied to many inputs, quietly ignoring bad data. »
- Failsafe[f][x] considers x a failure if x has any of the following forms:
-
Failure[…] Missing[…] $Failed $Canceled $Aborted - Failsafe[f][x1,x2,…] returns the first x1 that is any of the above forms. »
Examples
open all close allBasic Examples (2)
Apply a failsafe version of a function:
The failsafe version returns the argument unchanged when it is a failure:
Make a failsafe version of Sqrt that only applies to positive numbers:
Scope (2)
Properties & Relations (4)
Related Guides
History
Text
Wolfram Research (2025), Failsafe, Wolfram Language function, https://reference.wolfram.com/language/ref/Failsafe.html.
CMS
Wolfram Language. 2025. "Failsafe." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Failsafe.html.
APA
Wolfram Language. (2025). Failsafe. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Failsafe.html
BibTeX
@misc{reference.wolfram_2025_failsafe, author="Wolfram Research", title="{Failsafe}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/Failsafe.html}", note=[Accessed: 10-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_failsafe, organization={Wolfram Research}, title={Failsafe}, year={2025}, url={https://reference.wolfram.com/language/ref/Failsafe.html}, note=[Accessed: 10-August-2025]}