Catch die() in event handlers, and react appropriately.