Yes, it seems like this would also work, but TBH it seems a little roundabout 
to me. Is the objective to avoid duplicates of the error string?

Maybe we could just extract the exception construction into a method:
```java
if (streamsGraphNode == null) {
  throw getNonWindowedGraceSearchException(chain);
}
...
public TopologyException getNonWindowedGraceSearchException(final String chain) 
{
  return new TopologyException(
    "Window close time is only defined for windowed computations. Got [" + 
chain + "]."
  );
}
```

What say you?

[ Full content available at: https://github.com/apache/kafka/pull/5567 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to