if (oldMessage != null) {
msg += "\n" + exception.getMessage();
}
AssertionFailedError newException = new AssertionFailedError(msg);
newException.setStackTrace(exception.getStackTrace());
newException.initCause(exception.getCause());
exception = newException;
} else {
exception = new RuntimeException(msg, exception);
}
}