Withrestart practically performs structured error recovery using named restart functions.
It's designed to make error recovery simpler and easier by removing the assumption that unhandled errors must be fatal.
A "restart" represents a named strategy for resuming execution of a function after the occurrence of an error. At any point during its execution a function can push a Restart object onto its call stack.
If an exception occurs within the scope of that Restart, code higher-up in the call chain can invoke it to recover from the error and let the function continue execution. By providing several restarts, functions can offer several different strategies for recovering from any errors.