if (original instanceof Exception)
throw (Exception) original;
else if (original instanceof Error)
throw (Error) original;
else
throw new UnexpectedThrowable("UnexpectedThrowable", original);
}
staticLog.debug("Got expected " + wrapperExpected.getName() + "(" + original + ")");
}
while (throwable.getCause() != null)
throwable = throwable.getCause();
if (deepExpected.isInstance(throwable) == false)
{
if (original instanceof Exception)
throw (Exception) original;
else if (original instanceof Error)
throw (Error) original;
else
throw new UnexpectedThrowable("UnexpectedThrowable", original);
}
else
{
staticLog.debug("Got expected " + deepExpected.getName() + "(" + throwable + ")");
}