Handle exceptions that don't derive from Exception

Specifically, handle things like java.lang.Error that derive from
Throwable.