I find it a little bit strange that your error handling function takes an 
optional in the first place.
The caller should only call an errror handler in case of an error, so you 
should already have unwrapped the optional. 

-Thorsten 

> Am 22.12.2015 um 18:30 schrieb Paul Cantrell via swift-evolution 
> <[email protected]>:
> 
> func handleFileNotFound(error: ErrorType?)
>         {
>         if let error = error
>             {
>             if case MyError.FileNotFound(let url) = error
>                 { print(url) }
>             }
>         }
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to