Notification function called whenever the Editor is about to shut down.
Calling veto() will cancel the shutdown.