caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Difficulty tracking Not_found uncaught exception from Labltk
@ 2004-11-29 20:08 George Necula
  0 siblings, 0 replies; only message in thread
From: George Necula @ 2004-11-29 20:08 UTC (permalink / raw)
  To: caml-list


 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. 
  


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-29 20:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 20:08 Difficulty tracking Not_found uncaught exception from Labltk George Necula

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).