async function pig(){ SSj.log("Oh no, I think I'm going to get eaten by the pig..."); throw new Error("PIG!!!"); SSj.log("The pig totally ate me, you guys!");}pig();SSj.log("The pig is coming to eat EVERYTHING.");
Dispatch.onExit: Run some code on shutdown, after the event loop terminates. This works even if the user manually closes the window!