AbortProtect
AbortProtect[expr]
evaluates expr, saving any aborts until the evaluation is complete.
Details

- Aborts that are generated during an AbortProtect take effect as soon as the execution of the AbortProtect is over.
- CheckAbort can be used inside AbortProtect to catch and absorb any aborts that occur.
- AbortProtect also protects against aborts generated by TimeConstrained and MemoryConstrained.
Examples
Basic Examples (2)
Protect part of a computation from early termination:
Make sure that an iteration is finished in a time-constrained computation:
Without AbortProtect, typically imax is updated, but not x:
Wolfram Research (1991), AbortProtect, Wolfram Language function, https://reference.wolfram.com/language/ref/AbortProtect.html.
Text
Wolfram Research (1991), AbortProtect, Wolfram Language function, https://reference.wolfram.com/language/ref/AbortProtect.html.
CMS
Wolfram Language. 1991. "AbortProtect." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AbortProtect.html.
APA
Wolfram Language. (1991). AbortProtect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AbortProtect.html