Latest 0.0.1
Homepage https://github.com/williamFalcon/SwiftTryCatch
License MIT
Platforms ios 7.0, requires ARC
Authors

Adds try/catch support for Swift.

Simple wrapper built around Objective-C @try/@catch/@finally.

Usage

Install via Cocoapods

pod 'SwiftTryCatch'

Create bridging header

  • When prompted with "Would you like to configure an Obj-C bridging header?", press "Yes".
  • Go to bridging header and add:

    #import "SwiftTryCatch.h"

Use

SwiftTryCatch.try({
         // try something
     }, catch: { (error) in
         println("(error.description)")
     }, finally: {
         // close resources
})

Latest podspec

{
    "name": "SwiftTryCatch",
    "version": "0.0.1",
    "summary": "Adds try/catch support for Swift.",
    "homepage": "https://github.com/williamFalcon/SwiftTryCatch",
    "license": "MIT",
    "authors": {
        "William Falcon": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cfr/SwiftTryCatch.git",
        "tag": "0.0.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "SwiftTryCatch.{h,m}"
}

Pin It on Pinterest

Share This