Hi,
Before patch 8.2.1832, exceptions from readdireex() cannot be caught.
When readdirex() fails to read a directory, it emits a status message.
If there are multiple unreadable directories, then multiple messages
are displayed. I am trying to filter these messages using the ":filter"
command.
In a Vim9 script, I am not able to filter the status message:
============
vim9script
var l: list<dict<any>>
:filter /abc/ l = readdirex('non-existing-dir')
echo l
The above code snippet displays the "E476: Invalid command:" error.
In a Vim8 script, i am able to filter the status message:
============
filter /abc/ let l = readdirex('non-existing-dir')
echo l
============