Skip to content

Instantly share code, notes, and snippets.

@konrad1977
Created June 14, 2015 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konrad1977/dfc4c39bc67a07a14cde to your computer and use it in GitHub Desktop.
Save konrad1977/dfc4c39bc67a07a14cde to your computer and use it in GitHub Desktop.
func login() {
do {
let token = try loginUserWithUsername("konrad1977", password: nil)
print("user logged in \(token)")
} catch LoginError.EmptyUsername {
print("empty username")
} catch LoginError.EmptyPassword {
print("empty password")
} catch {
print(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment