I am using the NSURLRequest
class in my iPhone app, and the method that calls it returns an NSString
which is great for when the connection goes throug
To get all the error details:
NSError * err;
...
[NSString stringWithFormat:@"%@", err];
You could try the localizedDescription
method, which returns a string.
More in the docs.
I found that there are three main methods to NSError:
for folks new to objective c (me), following is example code that makes accepted answer from 'KennyTM' work ->
[self showAlertWithTitle:@"Error:" withMessage:error.localizedDescription];
-[NSError localizedDescription].
(Also, every ObjC object inherited from NSObject implements -description
which returns an NSString.)