* added syntax sugar for try{...}catch(){...}

This commit is contained in:
Reinhard Pointner 2013-02-02 03:18:40 +00:00
parent 823effbe40
commit 93f2bd39de
2 changed files with 1 additions and 0 deletions

Binary file not shown.

View File

@ -5,6 +5,7 @@ import java.util.regex.Pattern
// simplified switch/case pattern matching
Object.metaClass.match = { Map cases -> def val = delegate; cases.findResult { switch(val) { case it.key: return it.value} } }
def x(c) { try { c.call() } catch (Throwable e) { null } }
/**