boolean (PsiStatement element) { if (element instanceof PsiThrowStatement) { return true; } else if (element instanceof PsiBlockStatement blockStatement) { final PsiCodeBlock codeBlock = blockStatement.getCodeBlock(); final PsiStatement[] statements = codeBlock.getStatements(); if (statements.length != 1) { return false; } final PsiStatement statement = statements[0]; return isSimpleThrowStatement(statement); } return false; }