Provide more git clone error message

This commit is contained in:
Yishi Lin 2017-07-22 19:16:15 +08:00
parent f4bb7c9779
commit 622382122d

View file

@ -119,10 +119,16 @@ class GitServerSettingTableViewController: UITableViewController {
} }
} catch { } catch {
DispatchQueue.main.async { DispatchQueue.main.async {
Utils.alert(title: "Error", message: error.localizedDescription, controller: self, completion: nil) let error = error as NSError
var message = error.localizedDescription
if let underlyingError = error.userInfo[NSUnderlyingErrorKey] as? NSError {
message = "\(message)\nUnderlying error: \(underlyingError.localizedDescription)"
}
Utils.alert(title: "Error", message: message, controller: self, completion: nil)
}
}
} }
} }
} }
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.cellForRow(at: indexPath) let cell = tableView.cellForRow(at: indexPath)