Show merge conflict file names in the error message (#681)
This commit is contained in:
parent
1d6785511a
commit
fddd0c2563
2 changed files with 6 additions and 2 deletions
|
|
@ -528,11 +528,10 @@ extension PasswordNavigationViewController: PasswordAlertPresenter {
|
|||
SVProgressHUD.showSuccess(withStatus: "Done".localize())
|
||||
SVProgressHUD.dismiss(withDelay: 1)
|
||||
}
|
||||
} catch {
|
||||
} catch let error as NSError {
|
||||
gitCredential.delete()
|
||||
DispatchQueue.main.async {
|
||||
SVProgressHUD.dismiss()
|
||||
let error = error as NSError
|
||||
var message = error.localizedDescription
|
||||
if let underlyingError = error.userInfo[NSUnderlyingErrorKey] as? NSError {
|
||||
message = message | "UnderlyingError".localize(underlyingError.localizedDescription)
|
||||
|
|
@ -540,6 +539,10 @@ extension PasswordNavigationViewController: PasswordAlertPresenter {
|
|||
message = message | "RecoverySuggestion.".localize()
|
||||
}
|
||||
}
|
||||
if let mergeConflictFiles = error.userInfo[GTPullMergeConflictedFiles] as? NSArray {
|
||||
let mergeConflictFilesString = mergeConflictFiles.componentsJoined(by: ", ")
|
||||
message = message | "MergeConflictError".localize(mergeConflictFilesString)
|
||||
}
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(800)) {
|
||||
Utils.alert(title: "Error".localize(), message: message, controller: self, completion: nil)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue