forked from ashleymills/Reachability.swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error handling and allow configuring notification queue
- Improved error handling: + Updated `ReachabilityError` to contain the error code returned by `SCError()` after an error occurs. + Made all calls to `SystemConfiguration`'s API produce and propagate the error. This affected some `init`'s, which now throw instead of returning an optional. + Renamed error cases to start with lowercase, according to Swift's error guidelines. - Allow configuring the notification `DispatchQueue`, which was previously hardcoded to `DispatchQueue.main`. It is now an optional, which if set to `nil` will use the notifier's internal queue to fire notifications. The default is still `.main`. - Minor clean ups
- Loading branch information
Showing
2 changed files
with
56 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters