Utility: Handle class def error correctly

java.lang.NoClassDefFoundError is an Error, not an Exception

Signed-off-by: Peter Cai <xqsx43cxy@126.com>