Skip to content

Instantly share code, notes, and snippets.

@polac24
Last active January 24, 2018 15:00
Show Gist options
  • Save polac24/82dd9d3083c146ae302c78c19c344deb to your computer and use it in GitHub Desktop.
Save polac24/82dd9d3083c146ae302c78c19c344deb to your computer and use it in GitHub Desktop.
public typealias HandleAction<T> = (T) throws -> ()
public protocol ErrorHandleable: class{
func `throw`(_ :Error, finally: @escaping (Bool)->Void)
func `catch`(action: @escaping HandleAction<Error>) -> ErrorHandleable
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment