Created
November 5, 2018 23:02
-
-
Save leopic/3aba7488473fef6b20905e292fed7124 to your computer and use it in GitHub Desktop.
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
enum HttpServiceError: Error { | |
case uno | |
case dos | |
} | |
struct HttpService { | |
func call() -> throws {} | |
} | |
enum FirmwareServiceError: Error { | |
case tres | |
case cuatro | |
} | |
struct FirmwareService { | |
func call() -> throws { | |
let hs = HttpService() | |
do { | |
try hs.call() | |
} | |
catch error { | |
// err, error es HttpService, pero quiero tirar FirmwareServiceError | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment