if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
} else if (cause instanceof Error) {
throw (Error) cause;
} else if (cause != null) {
throw new ProxyCreationException(cause);
} else {
throw new ProxyCreationException(e);
}
} finally {
Enhancer.registerCallbacks(proxyType, null);
}
}