chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Unknown
Date: Thu, 12 Nov 2015 19:52:39 -0500

>From "Mathieu Desrochers"@laptop.videotron.ca Thu Nov 12 19:51:50 2015
Envelope-to: address@hidden
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60145)
        by lists.gnu.org with esmtp (Exim 4.71)
        (envelope-from <"Mathieu Desrochers"@laptop.videotron.ca>)
        id 1Zx2aj-0007gq-JL
        for address@hidden; Thu, 12 Nov 2015 19:51:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
        (envelope-from <"Mathieu Desrochers"@laptop.videotron.ca>)
        id 1Zx2af-0004Qy-Hl
        for address@hidden; Thu, 12 Nov 2015 19:51:49 -0500
Received: from relais.videotron.ca ([24.201.245.36]:37630)
        by eggs.gnu.org with esmtp (Exim 4.71)
        (envelope-from <"Mathieu Desrochers"@laptop.videotron.ca>)
        id 1Zx2af-0004QN-DP
        for address@hidden; Thu, 12 Nov 2015 19:51:45 -0500
MIME-version: 1.0
Content-transfer-encoding: 7BIT
Content-type: text/plain; CHARSET=US-ASCII
Received: from laptop.localnet ([173.178.252.80])
        by VL-VM-MR005.ip.videotron.ca
        (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built
        Apr 21
        2011)) with ESMTP id <address@hidden> for
        address@hidden; Thu, 12 Nov 2015 18:36:45 -0500 (EST)
From: address@hidden
To: address@hidden
Date: Thu, 12 Nov 2015 18:36:35 -0500
Message-id: <address@hidden>
User-Agent: KMail/4.14.1 (Linux/3.16.0-4-686-pae; KDE/4.14.2; i686; ; )
X-detected-operating-system: by eggs.gnu.org: Solaris 10
X-Received-From: 24.201.245.36
X-Mailman-Approved-At: Thu, 12 Nov 2015 19:52:38 -0500
Subject: [Chicken-users] Rethrowing an exception
X-BeenThere: address@hidden
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: <chicken-users.nongnu.org>
List-Unsubscribe: <https://lists.nongnu.org/mailman/options/chicken-users>,
        <mailto:address@hidden>
List-Archive: <http://lists.nongnu.org/archive/html/chicken-users>
List-Post: <mailto:address@hidden>
List-Help: <mailto:address@hidden>
List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/chicken-users>,
        <mailto:address@hidden>
X-List-Received-Date: Fri, 13 Nov 2015 00:51:50 -0000

Hi all,

I have this piece of code I use to ensure any system resource being allocated 
gets released:

    ;; invokes a procedure with the guarantee
    ;; the allocated resource will be released
    (define (with-release allocation-procedure procedure release-procedure)
      (let ((allocated-resource (allocation-procedure)))
        (handle-exceptions
          exception
          (begin
            (release-procedure allocated-resource)
            (abort exception))
          (let ((procedure-result (procedure allocated-resource)))
            (release-procedure allocated-resource)
            procedure-result))))

Works beautifully, but I seem to be loosing the backtrace from the original 
(abort). Is there anyway I can catch an exception but then let it continue as 
if nothing had ever happened?

Thanks a bunch,
Mathieu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]