Skip to content

Instantly share code, notes, and snippets.

@federicocappelli
Created February 21, 2018 11:01
Show Gist options
  • Save federicocappelli/877807b4e40984612028efc8c896f37e to your computer and use it in GitHub Desktop.
Save federicocappelli/877807b4e40984612028efc8c896f37e to your computer and use it in GitHub Desktop.
iOS Error management snippet 1
func getDataFromUrl(url: URL, completion:(_ data: Data?, _ response: URLResponse?, _ error: NSError?) -> Void) {
...
if (data) {
// Do something
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment