guile-user
[Top][All Lists]
Advanced

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

where is #<primitive-procedure apply>?


From: Paul Jarc
Subject: where is #<primitive-procedure apply>?
Date: Fri, 31 Jan 2003 20:11:31 -0500
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 (i686-pc-linux-gnu)

I have a lazy-catch handler that examines the stack to see what
procedure threw the exception, and what its arguments are.  In the
case of the system-error resulting from this:
(apply execlp '("doenotexist" "doesnotexist"))
the procedure is #<primitive-procedure apply>, and the arguments are:
(#<primitive-procedure execlp> ("doenotexist" "doesnotexist"))

When this happens, I want to pretend the procedure was
#<primitive-procedure execlp> and the arguments were ("doenotexist"
"doesnotexist").  But how can I recognize this situation?  This
doesn't work: (eq? apply (frame-procedure frame)) because apply is
#<procedure apply>, not #<primitive-procedure apply>.  Is there some
way I can get a reference to #<primitive-procedure apply> to plug into
the comparison?  I could deliberately trigger an error and save the
reference from the stack, but I'd like to know if there's a cleaner
way.


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]