Error Handling Rationale and Proposal がリンク切れになっていたので、こちらがリダイレクト先として妥当でしょうか
![Swiftのエラー4分類 - 見やすくしてみました (あえてTwitter埋め込みという形式を選んでいるのであればスルーして下さい) - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/cbc1f0f7d57c0fbd7dc87d81bc07542c36a83eff/height=288;version=1;width=512/https%3A%2F%2Fcdn.qiita.com%2Fassets%2Fqiita-fb-2887e7b4aad86fd8c25cea84846f2236.png)
Swift 2.0 の Error Handling ってどんな機会に使うんだろうと思いながら過ごしていたら、NSFileManager の contentsOfDirectoryAtPath:メソッド で縁があったので、そこから感じたことを記してみることにしました。 Swift 2.0 の Error Handling というのは、エラーの状況に応じて適切な回復手段を提供するための仕組みで、これまでの真偽値やオプショナルを使った方式のように、成功したか失敗したかだけでは物足りない場面をカバーできるもののようです。 また、NSError を使った Cocoa フレームワークのエラー処理を自然に扱えるようにデザインされたものという位置づけもあるようです。 Cocoa の Error Handling NSFileManager の contentsOfDirectoryAtPath: に見る
June 29, 2014 Error Handling in Swift: Might and Magic If distance brings perspective, proximity brings understanding. Concepts that were remote and downright strange when I played with them in Haskell or read about them in Scala are blindingly obvious solutions to any number of problems now that I am programming in Swift. Take error handling. As a concrete example, dividing two numbers, which wil
Update, August 22nd, 2014: Please see Error Handling – Take Two for some updated insights. It may be the case that named tuples are the right approach to solve this problem. : .info Error handling is something that seems to be have been left to the coder to figure out for Swift. Yes, there is the overly clunky and terribly awkward NSError usage: func contentsForType(typeName: String, error: NSErro
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く