when-exit

Execute a function right before the process, or the browser's tab, is about to exit.

rethrow

Re-throw an error to get better error reporting for templates.