Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Begone t1737... | Hubert Plociniczak | 2011-11-02 | 1 | -3/+3 |
| | |||||
* | Generalizes catch blocks to include any Partial... | Paul Phillips | 2010-12-03 | 1 | -0/+34 |
Generalizes catch blocks to include any PartialFunction[Throwable, T]. Existing catch blocks will compile exactly as before. Anything else (which mean: the token after CATCH is not a left brace, or it is a left brace not immediately followed by CASE) is desugared as follows: try body catch expr // becomes try body catch { case x => val catchFn = expr if (catchFn isDefinedAt x) catchFn(x) else throw x } Review by odersky. |