diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-07-21 20:15:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-07-21 20:15:52 -0700 |
commit | 5ff4246327fd802923faa77a3421d2384d643735 (patch) | |
tree | df48d8818e7a91532b96a401036d30acc9cd4f58 /stdlib/path-test.tl | |
parent | d4d20af163a97f2af069b2c12c1672b08835d1c2 (diff) | |
download | txr-5ff4246327fd802923faa77a3421d2384d643735.tar.gz txr-5ff4246327fd802923faa77a3421d2384d643735.tar.bz2 txr-5ff4246327fd802923faa77a3421d2384d643735.zip |
compile-file: distinguish nonexistence errors.
The compile-file function must only try a different
path, such as with a suffix, if a given path fails
to open due to non-existence. If the failure is for
another reason, like permissions. In that case we want
to propagate the failure.
* stdlib/compiler.tl (ign-notfound): New macro.
This lets through all errors, catching only path-not-found,
converting that to a nil result.
(open-compile-streams): Use ign-notfound instead of
ignerr when trying to open an input file for reading.
Also, we lose the ignerr wrapping around the open-file.
We let any error whatsoever just bubble out so that the user
is better informed about what went wrong. The requirement
to close the input stream is handled by the obvious
unwind-protect.
Diffstat (limited to 'stdlib/path-test.tl')
0 files changed, 0 insertions, 0 deletions