Fix to use Exception#ignoring to ignore Exception.

This commit is contained in:
takezoe
2014-03-02 04:24:24 +09:00
parent 200d095034
commit 7701521a2e

View File

@@ -16,7 +16,7 @@ object ControlUtil {
def using[A <% { def close(): Unit }, B](resource: A)(f: A => B): B = def using[A <% { def close(): Unit }, B](resource: A)(f: A => B): B =
try f(resource) finally { try f(resource) finally {
if(resource != null){ if(resource != null){
allCatch { ignoring(classOf[Throwable]) {
resource.close() resource.close()
} }
} }