Hi,
* So the code attempts to open a directory but fails generating an exception. Likely because it isn't a directory, or any number of permission issues.
Yes.
* The probe still counts this as an stream even though it isn't actually there??
It counts it as an attempt to open a stream, and indicates that the attempt has failed by recording the exception.
* The close isn't invoked because the exception occurred before it could be reached.
Yes.
Is that correct?
Yes, all is correct.
If it is, how can we say that's expected behavior in the final tally of open and closed streams? The stream was never opened?
Good question. Currently, "Open" events contain both successful and failed attempts. Failed ones have non-empty value in "Exception" column.
Is there a way I can filter out these streams that we aborted (before they became real) because of an exception? So that when i try to hunt for real problems, I can do so?
As I wrote, the inspection "Not closed directory streams" skips failed streams and never reports them as a problem. So if the inspections finds no problem, there is no problem.
There is no dedicated filter for that in "Events", and likely we should add one.
Best regards,
Anton