Re-implement immediate reboot using throw/catch, so all the end-of-run
tasks (e.g. report handlers) still get to run.