Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Where did the exception occur?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-10-30 (14:52)
From: Stephan Houben <stephan@p...>
Subject: Re: Where did the exception occur?
On Mon, 30 Oct 2000, Pierre Weis wrote:
> > List, 
> >   I'd like to point out, that my application (LARGE OCaml project) is
> > embedded in C code, so one cannot use the OCaml debugger to replay and
> > find the exception.  I'd be happy if a feature would be added to the
> > language to point out which line in the code the exception came from (I
> > understand this was added to SML ?).

> Otherwise, the addition you mentioned is interesting, if only we could
> implement it with no penalty on the speed of exception raising. Have
> you an idea of such a compilation scheme ?

I'm not the OP, but this can of course be implemented by having an
additional (hidden) field in the exception which contains the source

I'm not sure how expensive this would be. But it would be useful to have,
at least as a compiler option. I suppose raising of an exception is
expected to be slow anyway, as opposed to installing an exception


ir. Stephan H.M.J. Houben
tel. +31-40-2474358 / +31-40-2743497