mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 23:15:49 +01:00
Fix to use Exception#ignoring to ignore Exception.
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user