caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] exception tracing with Threads
@ 2001-04-05 13:55 Ohad Rodeh
  2001-04-06 15:47 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Ohad Rodeh @ 2001-04-05 13:55 UTC (permalink / raw)
  To: caml-list

List,
  I've just tried to use the exception tracing
mechanism for threads. Unfortunately, when using
threads this option is not enabled. 

For example: 

let _ = 
    let i=1 in
    let b=2 in 
    let c=3 in
    failwith "Sanity"

fails with the trace:
  Fatal error: uncaught exception Failure("Sanity")
  Raised at module Pervasives, character 1012
  Called from module Xx, character 68

While the equivalent program with threads:

let _ = 
  let _ = Thread.create (fun () -> 
    let i=1 in
    let b=2 in 
    let c=3 in
    failwith "Sanity"
  ) () in

  Thread.delay 4.0;
  ()

fails without a trace. 

Any ideas? 

   Thanks, 
	Ohad.

----------------------------------------------------------
orodeh@cs.huji.ac.il
www.cs.huji.ac.il/~orodeh



-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] exception tracing with Threads
  2001-04-05 13:55 [Caml-list] exception tracing with Threads Ohad Rodeh
@ 2001-04-06 15:47 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-04-06 15:47 UTC (permalink / raw)
  To: Ohad Rodeh; +Cc: caml-list

>   I've just tried to use the exception tracing
> mechanism for threads. Unfortunately, when using
> threads this option is not enabled. 

Right.  That's an oversight.  I agree it would be useful to have a
stack backtrace for threads that terminate on an exception.  It's not
absolutely trivial to implement, though.  I push this on my to do stack.

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-06 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-05 13:55 [Caml-list] exception tracing with Threads Ohad Rodeh
2001-04-06 15:47 ` Xavier Leroy

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