if (value != null) {
if (value instanceof Wrapper) {
value = ((Wrapper) value).unwrap();
}
if (value instanceof Throwable) {
se.initCause((Throwable) value);
}
}
// if the cause could not be set, overwrite the stack trace
if (se.getCause() == null) {