* [Caml-list] exception messages pbs
@ 2001-10-16 12:43 Pixel
2001-10-24 14:37 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Pixel @ 2001-10-16 12:43 UTC (permalink / raw)
To: caml-list
- long Failure exceptions get truncated, eg:
failwith "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxA"
is there a way to tell the runtime to display it fully?
- when an exception occurs, the file descriptors are not flushed. To have them
flushed, I use :
try ... with e -> flush stdout ; raise e
which works nicely, except that back-in-time debugging is harder (you have to
go back the various catching code). Any better solution?
thanks, Pixel.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
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 messages pbs
2001-10-16 12:43 [Caml-list] exception messages pbs Pixel
@ 2001-10-24 14:37 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-10-24 14:37 UTC (permalink / raw)
To: Pixel; +Cc: caml-list
> - long Failure exceptions get truncated, eg:
Right. The string representation of the exception is computed in a
fixed-size buffer. You can easily change the size of this buffer
(declaration of "struct stringbuf" in byterun/printexc.c). Ideally,
the buffer would grow as needed...
> - when an exception occurs, the file descriptors are not flushed. To
> have them flushed, I use :
>
> try ... with e -> flush stdout ; raise e
>
> which works nicely, except that back-in-time debugging is harder (you have to
> go back the various catching code). Any better solution?
That's a known open issue. The C code that traps and display the
exception could call back into Caml to perform the flushing (and more
generally all "at_exit" processing), but some care must be taken if
some of this processing raises an exception itself :-)
- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
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-10-24 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-16 12:43 [Caml-list] exception messages pbs Pixel
2001-10-24 14:37 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox