假设我捕获了一个类型异常AppException但我只想对该异常执行某些操作,如果它有类型的嵌套异常StreamException.
if (e instanceof AppException)
{
// only handle exception if it contains a
// nested exception of type 'StreamException'
Run Code Online (Sandbox Code Playgroud)
如何检查嵌套StreamException?