English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Exceptions and at_exit
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-14 (17:35)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Exceptions and at_exit
> What if you did something like:
>     try ... with
>         Failure msg as exn -> <do some stuff>; raise exn
> Would that leave the original traceback intact?

Yes -- provided <some stuff> doesn't raise exceptions.  The trace back
mechanism relies on reference equality (==) on exception values: if
the program raises an exception that is == to the latest exception
raised, this is considered as a "re-raise" and adds to the traceback;
otherwise, it's considered as an "initial raise" and a fresh traceback is

- Xavier Leroy
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners