 		var result: AlertResponce
 		let alert = NSAlert(error: err)
 		switch alert.runModal() {
-		case NSModalResponceStop:
+		case NSModalResponseStop:
 			result = .Stop
-		case NSModalResporceAbort:
+		case NSModalResponseAbort:
 			result = .Abort
-		case NSModalResporceContinue:
+		case NSModalResponseContinue:
 			result = .Continue
+		default:
+			NSLog("Unknown result")
+			result = .Abort
 		}
 		return result
 	}

	public class func runModal(error err: NSError, in viewcont: UIViewController) -> AlertResponce
	{
		let title   = "Error"
		let message = err.description
		let alert   = UIAlertController(title: title, message: message, preferredStyle: .alert)
		let acttion = UIAlertAction(title: "OK", style: .default, handler: {
			(action:UIAlertAction!) -> Void in

		alert.addButton(withTitle: "Cancel")
		alert.addButton(withTitle: "Don't save")

		var result : SaveResponce
		switch alert.runModal() {
		case NSAlertFirstButtonReturn:
			result = .Save
		case NSAlertSecondButtonReturn:
			result = .Cancel
		case NSAlertThirdButtonReturn:
			result = .DontSave
		default:
			result = .Cancel
		}
		return result
	}
