{"height":"190","author_url":"https://blog.hatena.ne.jp/pebble8888/","categories":["swift"],"blog_title":"Pebble Coding","version":"1.0","author_name":"pebble8888","type":"rich","provider_name":"Hatena Blog","url":"https://pebble8888.hatenablog.com/entry/2017/05/15/201632","published":"2017-05-15 20:16:32","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpebble8888.hatenablog.com%2Fentry%2F2017%2F05%2F15%2F201632\" title=\"swift precondition\u3068assert\u306e\u9055\u3044 - Pebble Coding\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","description":"swift\u306b\u306fassert\u3055\u305b\u308b\u95a2\u6570\u304c\u3044\u3063\u3071\u3044\u3042\u3063\u3066\u56f0\u308a\u307e\u3059\u3002 1) assert() let ary = [1, 2, 3] let i = 3 assert(i < ary.count) print(\"\\(ary[i])\") assertion failed: file /develop/aaa/aaa/ViewController.swift, line 18 2) precondition() let ary = [1, 2, 3] let i = 3 precondition(i < ary.count) print(\"\\(ary[i])\") precondition failed:\u2026","blog_url":"https://pebble8888.hatenablog.com/","width":"100%","image_url":null,"title":"swift precondition\u3068assert\u306e\u9055\u3044"}