scalax.control

object ensuring

[source: scalax/control/ensuring.scala]

object ensuring
extends AnyRef
Method Summary
def apply [A](dispose : => Unit)(body : => A) : A
Ensures that the given disposal function is called following execution of the body. This differs from 'finally' in that if both the body and dispose blocks throw exceptions, the one from the body will be propagated.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def apply[A](dispose : => Unit)(body : => A) : A
Ensures that the given disposal function is called following execution of the body. This differs from 'finally' in that if both the body and dispose blocks throw exceptions, the one from the body will be propagated.


Copyright (c) 2005-8 The Scalax Project. All Rights Reserved.