Skip to content

Instantly share code, notes, and snippets.

@cbowns
Created April 28, 2016 19:23
Show Gist options
  • Select an option

  • Save cbowns/d16dc0beb9cfcf6d3e019ddf06c3a8d5 to your computer and use it in GitHub Desktop.

Select an option

Save cbowns/d16dc0beb9cfcf6d3e019ddf06c3a8d5 to your computer and use it in GitHub Desktop.

Revisions

  1. cbowns created this gist Apr 28, 2016.
    8 changes: 8 additions & 0 deletions Swift 2.2 error-handling
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    do {
    try <#throwing method#>
    } catch let error as NSError {
    let errorString = "<#describe the error#>"
    DDLogError("Error: \(errorString)")
    DDLogError(error.debugDescription)
    assert(false, errorString)
    }