<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div> I find it a little bit strange that your error handling function takes an optional in the first place.</div><div>The caller should only call an errror handler in case of an error, so you should <span style="background-color: rgba(255, 255, 255, 0);">already </span>have unwrapped the optional. </div><div><br></div><div>-Thorsten </div><div><br>Am 22.12.2015 um 18:30 schrieb Paul Cantrell via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>>:<br><br></div><blockquote type="cite"><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">func</span> handleFileNotFound(error: <span style="font-variant-ligatures: no-common-ligatures; color: #587ea8" class="">ErrorType</span>?)</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> {</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">let</span> error = error</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> {</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">if</span> <span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">case</span> MyError.FileNotFound(<span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">let</span> url) = error</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> { <span style="font-variant-ligatures: no-common-ligatures; color: #587ea8" class="">print</span>(url) }</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> }</div><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo;" class=""> }</div></blockquote></body></html>