*/
public static YanException wrapInstantiationException(Throwable e){
if(e instanceof Error)
throw (Error)e;
if(e instanceof YanException){
final YanException ye = (YanException)e;
return ye;
}
if(e instanceof InvocationTargetException){
final Throwable cause =
((InvocationTargetException)e).getTargetException();
if(cause != e){
return wrapInstantiationException(cause);
}
}
final YanException ye = new ComponentInstantiationException(e);
return ye;
}