* where is #<primitive-procedure apply>?
@ 2003-02-01 1:11 Paul Jarc
0 siblings, 0 replies; only message in thread
From: Paul Jarc @ 2003-02-01 1:11 UTC (permalink / raw)
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
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-01 1:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-01 1:11 where is #<primitive-procedure apply>? Paul Jarc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).