void (@NotNull PsiElement element) { if (!element.isValid()) { throw new AssertionError("Commit to '" + psiFile.getVirtualFile() + "' has led to invalid element: " + element + "; Reason: '" + reason + "'"); } }