void () { boolean old = myTool.ignoreForExceptionConstructors; try { myTool.ignoreForSpecifiedExceptionConstructors = "java.io.IOException"; myTool.ignoreForExceptionConstructors = false; doTest(); } finally { myTool.ignoreForSpecifiedExceptionConstructors = ""; myTool.ignoreForExceptionConstructors = old; } }