SpiderMonkey のサポートする try {} catch (x if p(x)) {} というガード構文.

moozmooz のブックマーク 2010/11/08 23:27

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

strawman:catch_guards [ES Wiki]

    Programs often need to catch exceptions conditionally. In portable ES, they have to write it like so: try { ... } catch (e) { if (p(e)) { ... } else { throw e; } } where p(e) is any predicate. Spid...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう