Created
July 14, 2016 02:05
An attempt at a protocol that can imply the present of specific cases
This file contains hidden or 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
import Foundation | |
public protocol FoundationErrorWrapper: ErrorProtocol { | |
static func wrappingError(_ error: NSError) -> Self | |
} | |
enum SomeError: ErrorProtocol, FoundationErrorWrapper { | |
case a | |
case wrappingError(NSError) | |
} | |
enum SomeOtherError: ErrorProtocol, FoundationErrorWrapper { | |
case b | |
case wrappingError(NSError) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment