Skip to content

Instantly share code, notes, and snippets.

@konrad1977
Created June 14, 2015 12:13
Show Gist options
  • Save konrad1977/a0353378fcee21df0bc5 to your computer and use it in GitHub Desktop.
Save konrad1977/a0353378fcee21df0bc5 to your computer and use it in GitHub Desktop.
Refactored version of login
func login() {
do {
let token = try loginUserWithUsername("konrad1977", password: nil)
print("user logged in \(token)")
} catch let error as LoginError {
print(error.description)
} catch {
print(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment