Created
May 17, 2016 00:04
-
-
Save mbopp/f07ef01a930117a3d1d5215e5494a74e to your computer and use it in GitHub Desktop.
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
signal | |
.mapError { (error: NSError) -> CustomError in | |
switch error.domain { | |
case "com.example.foo": | |
return .Foo | |
case "com.example.bar": | |
return .Bar | |
default: | |
return .Other | |
} | |
} | |
.observeFailed { error in | |
print(error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment