Version française
Home     About     Download     Resources     Contact us    
Browse thread
Private exceptions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alessandro Baretta <a.baretta@b...>
Subject: Re: [Caml-list] Private exceptions
Eric Cooper wrote:
> On Mon, Jan 30, 2006 at 03:31:56PM +0100, Alessandro Baretta wrote:
> 
> But the ability to match any exception (and re-raise it, without
> knowing anything more about it) is essential for implementing
> constructs like "unwind-protect", "with-open-file", suspend/force,
> etc.

You are right, I must admit. Yet the problem remains. There are times when 
catching exceptions is unsafe. In my case, the exception aborts a database 
transaction. If the exception is not propagated to the calling transaction 
manager call, this will continue to execute the current transaction outside of 
the transaction block--as a rollback has already been issued.

Now, of course there is never only one way to solve a given programming problem, 
and I did solve mine without tampering with the exception system too 
much--except that I no longer export the exception signalling a transaction 
rollback, so that at least it cannot be *explicitely* filtered.

Alex


-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>