<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/07/bb20974642b0a6c34c428a093f2086a5"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-07-30T14:44:21"
  subject="Re: [Caml-list] unwind-protect"
  prev="2003/07/5ff669a9d2be35ec585b536e2e0fc7ca"
  next="2003/07/40d54eae7f4ed6f16eb41e07c5c59e83"
  prev-in-thread="2003/07/0ee85c5c688c958d4d9c57749ea69cb2"
  next-in-thread="2003/07/7321c1d7a6a5de7042a617ca2c897309"
  prev-thread="2003/07/976c83213750a167f0a635b7687ffe81"
  next-thread="2003/07/ba9f7a43c963a0693df6ce5d6c7736d4"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] assert caught by try with _">
<msg 
  url="2003/07/8d067f3472c9db2843900ad04bc1ddfd"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-28T18:43:41"
  subject="[Caml-list] assert caught by try with _">
<msg 
  url="2003/07/1b6ecd32d8cb08e0e226160a88d2418f"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2003-07-28T19:08:22"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/da955a051fbb26778695027528f86f7b"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-29T02:37:13"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/012000871048c09c09b73acb0a767ec8"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-07-29T03:18:01"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/421e11339985a294563f9b4fc0d5a34d"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2003-07-29T21:01:52"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/08/cc45ea5e2dc634955ab812e1d6fdacd7"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-08-06T12:21:08"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/08/4aebd5f287a4e3d4cc44215ead37efd7"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-08-06T14:50:26"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/08/89bd326adba5da59a781ac6d3ad19564"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-08-06T17:45:16"
  subject="Re: [Caml-list] assert caught by try with _">
</msg>
</msg>
</msg>
<msg 
  url="2003/07/af414b82397383bcb6da895d2858c783"
  from="Yaron M. Minsky &lt;yminsky@c...&gt;"
  author="Yaron M. Minsky"
  date="2003-07-30T10:22:20"
  subject="Re: [Caml-list] assert caught by try with _">
<msg 
  url="2003/07/40d54eae7f4ed6f16eb41e07c5c59e83"
  from="james woodyatt &lt;jhw@w...&gt;"
  author="james woodyatt"
  date="2003-07-30T15:47:38"
  subject="Re: [Caml-list] assert caught by try with _">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/07/b7392a72f9fe176635fedc6a184d67e1"
  from="Jason Hickey &lt;jyh@c...&gt;"
  author="Jason Hickey"
  date="2003-07-30T05:45:03"
  subject="[Caml-list] unwind-protect">
<msg 
  url="2003/07/5ff669a9d2be35ec585b536e2e0fc7ca"
  from="Yaron M. Minsky &lt;yminsky@c...&gt;"
  author="Yaron M. Minsky"
  date="2003-07-30T10:30:23"
  subject="Re: [Caml-list] unwind-protect">
<msg 
  url="2003/07/85b8e032e5a714fc6c464715b482bb2c"
  from="Didier Remy &lt;Didier.Remy@i...&gt;"
  author="Didier Remy"
  date="2003-07-30T17:25:46"
  subject="Re: [Caml-list] unwind-protect">
<msg 
  url="2003/07/0ee85c5c688c958d4d9c57749ea69cb2"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-07-31T00:47:09"
  subject="Re: [Caml-list] unwind-protect">
</msg>
</msg>
</msg>
<msg 
  url="2003/07/bb20974642b0a6c34c428a093f2086a5"
  from="William Lovas &lt;wlovas@s...&gt;"
  author="William Lovas"
  date="2003-07-30T14:44:21"
  subject="Re: [Caml-list] unwind-protect">
</msg>
</msg>
<msg 
  url="2003/07/7321c1d7a6a5de7042a617ca2c897309"
  from="Jason Hickey &lt;jyh@c...&gt;"
  author="Jason Hickey"
  date="2003-07-30T05:44:09"
  subject="Re: [Caml-list] assert caught by try with _">
</msg>
</msg>
</thread>

<contents>
On Tue, Jul 29, 2003 at 10:44:58PM -0700, Jason Hickey wrote:
&gt; 2. This kind of exception re-raising does not work well with stack 
&gt; tracing (OCAMLRUNPARAM=b).  It would be very nice to add a "finally" 
&gt; clause that did not interfere with stack tracing, or make it so that 
&gt; re-raising would preserve the location where the exception was created.

It looks to me like re-raising *does* preserve the location where the
exception was created.  My toy example:


--8&lt;-- raise.ml ---
let f () = raise Not_found
--8&lt;---------------

--8&lt;-- main.ml ---
try Raise.f () with e -&gt; raise e
--8&lt;--------------

% ocamlc -g -o go raise.ml go.ml
% ./go
Fatal error: exception Not_found
Raised at module Raise, character 26
Called from module Main, character 14
Re-raised at module Main, character 32


I remember one of the developers mentioning this behavior in a discussion a
while back.

cheers,
William

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

</contents>

</message>

