public void setThrowOnNodeNotFound(boolean flag) {
    throwOnNodeNotFound = flag;
  }
Controls whether to throw an AstInspectorException or to return <tt>null</tt>
when a getXXX() method cannot find a matching AST node. Defaults to <tt>true</tt>.

@param flag <tt>true</tt> if an exception should be thrown,
<tt>false</tt> otherwise
spock-core/src/main/java/org/spockframework/util/inspector/AstInspector.java