Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
co-ordinate.

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

Stephan

-- 
ir. Stephan H.M.J. Houben
tel. +31-40-2474358 / +31-40-2743497
e-mail: stephanh@win.tue.nl