From: George Necula <necula@eecs.berkeley.edu>
To: caml-list@inria.fr
Subject: Difficulty tracking Not_found uncaught exception from Labltk
Date: Mon, 29 Nov 2004 12:08:18 -0800 [thread overview]
Message-ID: <4E06A937DADC3842ACE4D3A1096A9EAC016AF38B@janus.EECS.Berkeley.EDU> (raw)
Hi,
If I bind a trivial action to the `FocusIn event of a canvas, I get
"Uncaught exception: Not_found" printed on the console and nothing else. The
code that I write is shown below:
Tk.bind ~events:[`FocusIn] ~fields:[`MouseX]
~action:(fun _ -> ignore (E.log "got the focus\n"))
srccode
I was able to track this message to Protocol.protected_dispatch. I tried to
change this function to propagate the exception further so that the
top-level can print the backtrace. This did not work (the exception is still
intercepted by somebody else). I then tried to put a call to
call_print_exception_backtrace in the protected_dispatch function. This
printed a couple of "caller unknown" lines for the Hashtbl module (but with
a wrong line number?).
If I turn on Protocol.debug then all I see is "camlcb 29 0". Since I do not
see the << printed, this led me to believe that the problem is the
Hashtbl.find in Protocol.dispatch_callback. From there I was able to find my
problem: I was calling remove_callbacks afterwards.
Is there a better way to debug such intercepted exceptions?
Thanks,
George Necula.
reply other threads:[~2004-11-29 20:08 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E06A937DADC3842ACE4D3A1096A9EAC016AF38B@janus.EECS.Berkeley.EDU \
--to=necula@eecs.berkeley.edu \
--cc=caml-list@inria.fr \
/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 NNTP newsgroup(s).