Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi. I am getting error in this code the line 2. I am using Xcode 8.

Error code is: ( Value of type "Error" has no member "description)



if let error = error {
print("Error uploading: \(error.description)")
return


What I have tried:

Not found any solution to fix that. Need help
Posted
Updated 10-Apr-17 22:01pm
Comments
Richard MacCutchan 7-Nov-16 12:28pm    
Check the documentation for the "Error" class.

1 solution

Do one thing in the if statement try error as? NSError() .
Objective-C
if let error = error as? NSError() {
print("Error uploading: \(error.description)") 
return
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900