Catching Throwable seems like the simplest and most succinct way to do it. I'll have a look at how bukkit does it, however.