[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Probe-file and errors



    Date: Thu 11 Apr 85 15:41:18-EST
    From: dzg@CMU-CS-SPICE.ARPA

    What seems to be impossible, for some reason, is to make simple things simple.
    ... My code just wants to do
      (cond ((probe-file "/usr/foo/bar")
	     ...)
	    ((probe-file "/user/may/be")
	     ...)
	    ((probe-file "/yet/another/one")
	     ...)
	    (t
	     ... cannot find it. Bye. ...))
    Simple as that. I do not (DO NOT!) want to handle an error...

In LispM lisp, you would write:

    (cond ((ignore-errors (probe-file "/usr/foo/bar"))
	   ...)
	  ...etc)

It seems to me that this is not an unreasonable thing and has the
advantage of making it nicely explicit that you in fact don't care 
what happens in the failing cases. 

IGNORE-ERRORS is not in my error proposal but could be added.
-kmp