// if it's not EJBTransactionRolledbackException
if (!(t instanceof EJBTransactionRolledbackException)) {
if (t instanceof Error) {
//t = new EJBTransactionRolledbackException(formatException("Unexpected Error", t));
Throwable cause = t;
t = new EJBTransactionRolledbackException("Unexpected Error");
t.initCause(cause);
} else if (t instanceof NoSuchEJBException) {
// If this is an NoSuchEJBException, pass through to the caller
} else if (t instanceof RuntimeException) {
t = new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
} else {// application exception
throw (Exception) t;
}
}