Skip to content

Matovsky/SwiftTryCatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftTryCatch

Adds try/catch for Objective C exceptions in Swift 2.x as a Carthage module.

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

Folked from https://github.com/ypopovych/SwiftTryCatch who forked from https://github.com/ravero/SwiftTryCatch and added OS X, tvOS and watchOS targets. Initial version is https://github.com/williamFalcon/SwiftTryCatch._

##Usage

Install via Carthage

Add this repro to your Cartfile per usual and carthage update drag to include, etc. (see https://github.com/Carthage/Carthage).

Use

SwiftTryCatch.tryBlock({
         // try something
     }, catchBlock: { (error) in
         println("\(error.description)")
     }, finallyBlock: {
         // close resources
})

About

Adds try-catch support for Swift

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Objective-C 96.0%
  • Swift 4.0%