Currently, exceptions from CheckDiskSpace calls in the scheduler thread (e.g. from events for blockfilterindex or the scheduled disk space check) are not caught, leading to a program termination:
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
what(): filesystem error: cannot get free space: No such file or directory [/tmp/bitcoin_func_test_1xy14g2w/node0/regtest/indexes/blockfilter/basic]
Immediate termination is fine, because those exceptions are unexpected, but it could make sense to be consistent and treat the exception like any other fatal error and instead shut down the program.
So shut down the program with a fatal error instead.