You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple Swift wrapper around an Objective-C @try/@catch statement that selectively catches Objective-C exceptions by NSException subtype, rethrowing if any caught exception is not the expected subtype.
This project can be used by direct inclusion in your projects or through any of the Swift Package Manager, CocoaPods or Carthage.
Minimum requirements are iOS 8 or macOS 10.9.
Manual inclusion
In a subdirectory of your project's directory, run git clone https://github.com/mattgallagher/CwlCatchException.git
Drag the "CwlCatchException.xcodeproj" file from the Finder into your own project's file tree in Xcode
Add the "CwlCatchException.framework" from the "Products" folder of the CwlCatchException project's file tree to the "Copy Files (Frameworks)" build phases of any target that you want to include this module.
That third step is a little tricky if you're unfamiliar with Xcode but it involves:
a. click on your project in the file tree
b. click on the target to whih you want to add this module
c. select the "Build Phases" tab
d. if you don't already have a "Copy File" build phase with a "Destination: Frameworks", add one using the "+" button in the top left of the tab
e. click the "+" within the "Copy File (Frameworks)" phase and from the list that appears, select the "CwlCatchException.framework" (if there are multiple frameworks with the same name, look for the one that appears above the corresponding macOS or iOS CwlCatchException testing target).
Swift Package Manager
Add the following to the dependencies array in your "Package.swift" file: