Georg Baum <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | | > Georg Baum <[EMAIL PROTECTED]> | > writes: | > | > | Do you have a better idea? The regexes will never be perfect, so we must | > | be able to test whether a given string denotes an existing file. | > | > fs::exists should never throw.... if it does we are feeding it really | > bogus data already. So IMHO the try/catch should not be needed. | > That is why I really would like to know _what_ throws really. | | Yes, we may feed it bogus data. The problem is that we don't know whether | the data is bogus or not, since it comes from regex "parsing" the LaTeX | log. This is what I tried to explain above: How should we find out if this | data is the name of an existing file other than using fs::exists?
fs:exsist should by itself work just fine with bogus data. Bugus data is a non-existing file, no problem there. And this is why I want to know _what_ is actually failing. is it fs::path, fs:exists, fs:is_directory what? Knowing this info is imho crucial to find the best way to handle the bug/error. -- Lgb