Created
June 15, 2020 13:05
-
-
Save stleamist/e3530f7088d12af266a0bcbd3c04be98 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
import Combine | |
extension Publisher { | |
func printError() -> Publishers.HandleEvents<Self> { | |
return self.handleEvents(receiveCompletion: { completion in | |
if case .failure(let error) = completion { | |
Swift.print("receive error: \(error)") | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment