unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Subject: where is #<primitive-procedure apply>?
Date: Fri, 31 Jan 2003 20:11:31 -0500	[thread overview]
Message-ID: <m365s46bza.fsf@multivac.cwru.edu> (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


                 reply	other threads:[~2003-02-01  1:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m365s46bza.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).