4 ms·
Wow, never knew one could do that.
by twir 17y ago
Wow, never knew one could do that.
- nradov 17y agoYou can't do that. It would require a language change, to make try/catch blocks expressions.
- twir 17y agoHeh, I didn't think so. ;)
- eldenbishop 17y agoYou can sort of do this in Groovy. def val = {try { 1 } catch(ex) { 2 }}.call() assert(1 == val)