Skip to content

Instantly share code, notes, and snippets.

@mbopp
Created May 17, 2016 00:04
Show Gist options
  • Save mbopp/f07ef01a930117a3d1d5215e5494a74e to your computer and use it in GitHub Desktop.
Save mbopp/f07ef01a930117a3d1d5215e5494a74e to your computer and use it in GitHub Desktop.
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