missing abs_path failure handling in DBD::File
Closed this issue · 5 comments
A misconfiguration of f_dir
and f_file
has led me to the error
Execution ERROR: -d : No such file or directory at .../DBI/DBD/SqlEngine.pm line 1538
It is the croak call that raises the exception. But the exception message is useless because $searchdir
is undefined. $searchdir
is undefined because the former abs_path call has failed. This OS failure ($!
is different from zreo) was not handled properly. Instead it was shadowed by the following -d
file test.
That indeed is DDB::File. Do you have a PR ready to improve on this?
No I have no PR yet. I will have a look at the current DBD::File
implementation to identify the strategy to handle exceptions. Then I will try to raise a PR. Do you have any suggestion about the test scrict I could copy and adjust to keep the test coverage as it is today?
The more tests the better: tests are cheap.
As DBD::File is the base for all DBD's that rely on files, they should all be tested on the new state (DBD::AnyData, DBD::CSV to start with)
Happy to see you involved in improving overall DBI/DBD experience!
One more Question: did you start from the git checkout? As 12e3b14 addressed f_dir
Do you have example code to test with?
No unfortunately not. I have tried to reproduce my wrong f_dir
and f_file
configuration. Now that I have read more about DBD::File
and DBD::CSV
it is hard to break things. For now I will close this issue.